Configuring and testing treatment therapy parameters for a medical device system

ABSTRACT

Apparatus and method support the configuration and testing of therapy parameters for a medical device system in the treatment of nervous system disorders. With the embodiment, the medical device system operates in a manual treatment therapy mode, in which the medical device system evaluates a set of information that is indicative of a system configuration. The medical device system determines if the set of information is acceptable. During the manual treatment therapy mode, the medical device system applies therapeutic treatment to a patient in accordance with the set of information. If the patient cannot tolerate the therapeutic treatment, the user indicates so through a user interface. The medical device system may associate the patient&#39;s intolerance to therapeutic treatments that equal or exceed the patient&#39;s level of tolerance. Moreover, the medical device system may use this information to prevent a delivery of therapeutic treatment that exceeds the patient&#39;s level of tolerance during a run mode.

[0001] This application claims priority to U.S. Provisional ApplicationSer. Nos. 60/418,623 filed Oct. 15, 2002 and 60/503,817 filed Sep. 19,2003, which are incorporated herein by reference in their entireties.

FIELD OF THE INVENTION

[0002] The present invention relates to the detection and the treatmentof nervous system disorders and more particularly to a method and amedical device system that configures and tests treatment therapyparameters.

BACKGROUND OF THE INVENTION

[0003] Nervous system disorders affect millions of people, causing deathand a degradation of life. Nervous system disorders include disorders ofthe central nervous system, peripheral nervous system, and mental healthand psychiatric disorders. Such disorders include, for example withoutlimitation, epilepsy, Parkinson's disease, essential tremor, dystonia,and multiple sclerosis (MS). Additionally, nervous system disordersinclude mental health disorders and psychiatric disorders which alsoaffect millions of individuals and include, but are not limited to,anxiety (such as general anxiety disorder, panic disorder, phobias, posttraumatic stress disorder (PTSD), and obsessive compulsive disorder(OCD)), mood disorders (such as major depression, bipolar depression,and dysthymic disorder), sleep disorders (narcolepsy), obesity, andanorexia. As an example, epilepsy is the most prevalent seriousneurological disease across all ages. Epilepsy is a group ofneurological conditions in which a person has or is predisposed torecurrent seizures. A seizure is a clinical manifestation resulting fromexcessive, hypersynchronous, abnormal electrical or neuronal activity inthe brain. (A neurological event is an activity that is indicative of anervous system disorder. A seizure is a type of a neurological event.)This electrical excitability of the brain may be likened to anintermittent electrical overload that manifests with sudden, recurrent,and transient changes of mental function, sensations, perceptions,and/or involuntary body movement. Because the seizures areunpredictable, epilepsy affects a person's employability, psychosociallife, and ability to operate vehicles or power equipment. It is adisorder that occurs in all age groups, socioeconomic classes, cultures,and countries. In developed countries, the age-adjusted incidence ofrecurrent unprovoked seizures ranges from 24/100,000 to 53/100,000person-years and may be even higher in developing countries. Indeveloped countries, age specific incidence is highest during the firstfew months of life and again after age 70. The age-adjusted prevalenceof epilepsy is 5 to 8 per 1,000 (0.5% to 0.8%) in countries wherestatistics are available. In the United States alone, epilepsy andseizures affect 2.3 million Americans, with approximately 181,000 newcases occurring each year. It is estimated that 10% of Americans willexperience a seizure in their lifetimes, and 3% will develop epilepsy byage 75.

[0004] There are various approaches in treating nervous systemdisorders. Treatment therapies can include any number of possiblemodalities alone or in combination including, for example, electricalstimulation, magnetic stimulation, drug infusion, and/or braintemperature control. Each of these treatment modalities can be operatedusing closed-loop feedback control. Such closed-loop feedback controltechniques receive from a monitoring element a neurological signal thatcarries information about a symptom or a condition or a nervous systemdisorder. Such a neurological signal can include, for example,electrical signals (such as EEG, ECoG, and/or EKG), chemical signals,other biological signals (such as change in quantity ofneurotransmitters), temperature signals, pressure signals (such as bloodpressure, intracranial pressure or cardiac pressure), respirationsignals, heart rate signals, pH-level signals, and peripheral nervesignals (cuff electrodes on a peripheral nerve). Monitoring elements caninclude, for example, recording electrodes or various types of sensors.

[0005] For example, U.S. Pat. No. 5,995,868 discloses a system for theprediction, rapid detection, warning, prevention, or control of changesin activity states in the brain of a patient. Use of such a closed-loopfeed back system for treatment of a nervous system disorder may providesignificant advantages in that treatment can be delivered before theonset of the symptoms of the nervous system disorder.

[0006] Before administering a command to commence in a run mode, whichmay occur in the absence of a clinician or a physician, it is importantthat the efficacy of the treatment be verified and that the treatment betolerable to the patient. Method and apparatus that enable a clinicianto configure and test a medical device system for an effective and safetreatment of a nervous system disorder, before applying the treatment ina run mode, is beneficial in the field of medical device systems fordelivering treatment for such disorders.

BRIEF SUMMARY OF THE INVENTION

[0007] In the embodiment of the invention, apparatus and method supportthe configuration and testing of therapy parameters for a medical devicesystem in the treatment of nervous system disorders. With theembodiment, the medical device system operates in a manual treatmenttherapy mode, in which the medical device system evaluates a set ofinformation that is indicative of a system configuration and that isprovided by a user. The medical device system determines if the set ofinformation is acceptable. During the manual treatment therapy mode, themedical device system applies therapeutic treatment to a patient inaccordance with the set of information. If the patient cannot toleratethe therapeutic treatment, the user indicates so through a userinterface. The medical device system may associate the patient'sintolerance to therapeutic treatments that equal or exceed the patient'slevel of tolerance. Moreover, the medical device system may use thisinformation to prevent a delivery of therapeutic treatment that exceedsthe patient's level of tolerance during a run mode.

[0008] The embodiment also enables the user to associate different nameswith different sets of information, thus enabling the user to configurethe medical device system for different therapeutic treatments byreference to an associated name.

[0009] The embodiment provides therapeutic treatment for a nervoussystem disorder by delivering stimulation through a set of electrodes.Other embodiments may support different forms of treatment, includingdrug infusion or a combination of electrical stimulation and druginfusion.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010]FIG. 1 shows one possible embodiment of an external system fortreating a nervous system disorder.

[0011]FIG. 2 shows a configuration of a bedside device that isassociated with the external control system of FIG. 1.

[0012]FIG. 3 shows a configuration of a sense electronics module that isassociated with the bedside device of FIG. 2.

[0013]FIG. 4 shows an embodiment of blanking circuitry that isassociated with the external system of FIG. 1.

[0014]FIG. 5 shows a hardware interface that is associated with thebedside device of FIG. 2.

[0015]FIG. 6 shows a signal processor that is associated with thebedside device of FIG. 2.

[0016]FIG. 7 shows a user interface processor that is associated withthe bedside device of FIG. 2.

[0017]FIG. 8 is a functional diagram of one embodiment of a seizuredetection algorithm for use with a medical device system for treatmentof a seizure.

[0018]FIG. 9 shows one possible embodiment of a hybrid system fortreating a nervous system disorder.

[0019]FIG. 10 is a schematic block diagram of an external component of ahybrid system for treatment of a nervous system disorder.

[0020]FIG. 11 is a schematic block diagram of the implantable componentof a hybrid system for treatment of a nervous system disorder.

[0021]FIG. 12 shows one possible embodiment an implantable system fortreating a nervous system disorder.

[0022]FIG. 13 shows an example of a medical device system for infusingdrug as the treatment therapy for treating nervous system disorders.

[0023]FIG. 14 is a schematic diagram of a relaying module worn on apatient's wrist for use with a medical device system having implantedcomponents.

[0024]FIG. 15 shows a top-level flow diagram for clock synchronizationand calibration for use with an external system.

[0025]FIG. 16 shows specific flow diagrams for clock synchronization andcalibration in relation to FIG. 15.

[0026]FIG. 17 depicts various graphs of a neurological signal containingflat-lined or clipped artifact data.

[0027]FIG. 18 depicts various graphs of a neurological signal containing60 Hz artifact data.

[0028]FIG. 19 shows simulated EEG waveforms, designating an onset of aneurological event.

[0029]FIG. 20 shows a flow diagram for a seizure screening procedure todefine treatment therapy according to an embodiment of the invention.

[0030]FIG. 21 shows a continuation of the flow diagram that is shown inFIG. 20.

[0031]FIG. 22 shows data associated with a maximal ratio as determinedby a seizure detection algorithm for detecting a cluster.

[0032]FIG. 23 shows a timing diagram including the seizure detectionalgorithm processed maximal ratio signal.

[0033]FIG. 24 is a flow diagram illustrating the process forimplementing a cycle mode of operation within generally any medicaldevice system.

[0034]FIG. 25 is a flow diagram for phase shifting in accordance with anembodiment of the invention where the nervous system disorder beingtreated is a seizure.

[0035]FIG. 26 is a graph of a result of applying the polynomialinterpolation phase shift algorithm.

[0036]FIG. 27 is a flow diagram for hardware and software blanking.

[0037] FIGS. 28-33 depict examples of the interpolating empiricalprobability function for various values.

DETAILED DESCRIPTION OF THE INVENTION

[0038] The invention may be embodied in various forms to analyze andtreat nervous system disorders, namely disorders of the central nervoussystem, peripheral nervous system, and mental health and psychiatricdisorders. Such disorders include, for example without limitation,epilepsy, Parkinson's disease, essential tremor, dystonia, multiplesclerosis (MS), anxiety (such as general anxiety, panic, phobias, posttraumatic stress disorder (PTSD), and obsessive compulsive disorder(OCD)), mood disorders (such as major depression, bipolar depression,and dysthymic disorder), sleep disorders (narcolepsy), obesity,tinnitus, stroke, traumatic brain injury, Alzheimers, and anorexia.

[0039] Moreover, the invention may utilize various treatment therapiesfor treating nervous system disorders. Treatment therapies can includeany number of possibilities alone or in combination including, forexample, electrical stimulation, magnetic stimulation, drug infusion,brain temperature control (e.g., cooling), and/or providing a sensorywarning to the patient/clinician, as well as any combination thereof.

[0040] Each of these treatment modalities may be operated usingclosed-loop feedback control or using open-loop therapy. Suchclosed-loop feedback control techniques receive one or more neurologicalsignals that carry information about a symptom or a condition of anervous system disorder. Such neurological signals can include, forexample, electrical signals (such as EEG, ECoG and/or EKG), chemicalsignals, biological signals (such as change in quantity ofneurotransmitters), temperature signals, pressure signals (such as bloodpressure, intracranial pressure or cardiac pressure), respirationsignals, heart rate signals, pH-level signals, and/or peripheral nervesignals (cuff electrodes on a peripheral nerve). Such neurologicalsignals may be recorded using one or more monitoring elements such asmonitoring electrodes or sensors. For example, U.S. Pat. No. 6,227,203,assigned to Medtronic, Inc., provides examples of various types ofsensors that may be used to detect a symptom or a condition or a nervoussystem disorder and responsively generate a neurological signal.

[0041] Even further, the invention may provide therapeutic treatment toneural tissue in any number of locations in the body including, forexample, the brain (which includes the brain stem), the vagus nerve, thespinal cord, peripheral nerves, etc.

[0042] Disclosed herein are three general embodiments of the medicaldevice system—an external system, a hybrid system, and an implantedsystem—however, the invention may be embodied in any number ofconfigurations. The following embodiments may be described with thespecific application of treating epilepsy by electrical stimulation ofthe brain and using closed-loop control monitoring of electricalactivity in the brain. Other embodiments of the invention may useopen-loop therapy, namely treatment therapy that can be providedindependent of information obtained from the monitoring of brainactivity. It will be appreciated, however, that other embodiments of theinvention may treat other nervous system disorders, utilize othertreatment therapies, optionally utilize closed-loop feedback control byreceiving other forms of neurological signals, and/or delivertherapeutic treatment to neural tissue in other locations in the body.Moreover, the medical device system may simply collect data from one ormore of the monitoring elements and provide that data to the patient ortreating physician to further enhance management of the nervous systemdisorder.

[0043] EXTERNAL SYSTEM—FIG. 1 shows a system configuration of anexternal system 100. In an embodiment, the external system 100 is foruse in the clinical environment although the external system 100 mayalso be used in other environments as well. As disclosed herein, theexternal system 100 provides electrical brain stimulation as the form oftreatment therapy for purposes of treating seizures or epilepsy as theform of nervous system disorder. As discussed, however, it will beappreciated that system 100 may also be used to provide other treatmenttherapies at other locations of the body to treat other forms of nervoussystem disorders.

[0044] The external system 100 senses electrical brain signals fromtemporarily and/or permanently implanted brain electrodes 101,conditions the brain signals for processing, executes a detectionalgorithm (e.g., seizure algorithm 800 in FIG. 8) on the signals todetermine the onset, presence, and/or intensity, duration, and spatialextent of neurological activity (e.g., seizure activity), and deliverselectrical stimulation in response to selected event detections (e.g.,seizure detections). Of course, in other embodiments, the externalsystem 100 may be able to determine the onset, presence, and/orintensity of other neurological events. The components of the externalsystem 100 may integrate with existing epilepsy monitoring unit (EMU)preamplifiers 103 and data collection systems to enable the simultaneoususe of customary monitoring equipment 105.

[0045] The external system 100 incorporates a number of programmableparameters and features, some of which are discussed further herein.This affords the treating physician and investigators the necessaryflexibility to explore a number of therapeutic paradigms. Data storage,display, and analysis capabilities are included in the system.

[0046] The external system 100 generally comprises a portable bedsidedevice 107, a programmer 109, and a number of accessories. Bedsidedevice 107 contains hardware and software to perform various functionsincluding, for example, sensing electrical signals recorded byin-dwelling brain electrodes 101, conditioning the signals for furtherprocessing by the seizure detection algorithm, executing the seizuredetection algorithm, and delivering treatment therapy such as electricalstimulation. Those skilled in the art will appreciate, however, thatthese functions of the bedside device 107 may be performed in othercomponents of the external system 100.

[0047] Electrodes 101 are typically placed in the brain or on thesurface of the brain or in the bone of the skull. Electrodes 101 couldbe placed between the surface of the skull and the scalp, within thescalp, over the scalp, or outside the body on the skin surface.Electrodes 101 are coupled to the bedside device 107 through input jackscompatible with standard electrode extensions and connectors. Electrodeoutput jacks on the box provide a means for passing raw brain signals toexisting EMU equipment. A serial port supports the real-time transfer ofdata between the programmer 109 and the bedside device 107. As discussedherein, electrodes 101 may take any number of forms including, but notlimited to, temporary subdural grid and strip electrodes, temporarydepth electrodes, deep brain stimulation (DBS) electrode systems, and/ora combination of several different electrode types. Although in anembodiment, the external system 100 utilizes eight electrodes, it willbe appreciated that greater or fewer electrodes may be utilized.Moreover, other forms of communication may also be utilized between thevarious components including wireless, infrared, radio frequency (RF),and/or computer network (e.g., LAN, WAN, Internet).

[0048] The external system 100 utilizes a programmer 109, which in theembodiment is a commercially available personal computer and anoperating system configured with custom external system applicationsoftware. Those skilled in the art will appreciate that anygeneral-purpose computing device may be used including, but not limitedto, a hand-held device. Other communication techniques, of course, mayalso be utilized including a telemetry device. The programmer 109 maydisplay in real-time the brain signals being processed by the system,the corresponding detection criteria for automated seizure detection,and other pertinent system and session information. All programmablesystem parameters, including electrode designation, algorithmparameters, and stimulation output parameters, may be adjusted throughthe programmer 109. Investigators may also use the programmer 109 toperform secondary functions, such as off-line algorithm analysis andadaptation.

[0049] Accessories for the external system 100 include a serial cable111 for connecting bedside device 107 to programmer 109, a medical grade6 Vdc power supply for primary power to bedside device 107, a supply ofbatteries for bedside device 107, and an event marker junction box (notshown). The event marker junction box allows the patient, or anyoneelse, to manually record the onset of an event of significance, such asa seizure (an ictal event). Data may be collected during the event andsent simultaneously to the bedside device 107 and the EMU equipment. Theevent marker junction box allows the patient event marker signal to beinput to both the EMU equipment and the bedside device 107simultaneously. In the embodiment, bedside device 107 is coupled to theevent marker junction box and to an event input of the EMU equipment.The ability to simultaneously input the event marker in the EMUequipment and the bedside device 107 also serves to synchronize eventsrecorded/stored in both the EMU equipment and the bedside device 107.With a variation of the embodiment, a time drift may be determined. Thetime drift is indicative of a time difference of the bedside device 107with respect to the EMU equipment.

[0050] Temporary diagnostic electrodes, manufactured by Adtech,Radionics, and PMT Corp. among others, may be used for recording brainsignals to aid in the identification of the areas responsible forseizure generation. Electrodes 101 are typically placed intracranially,on the surface of the brain (subdural grids and strips) or within braintissue (depth electrodes), near areas suspected of being epileptogenic.ECoG signals from these electrodes 101 are recorded on external EEGmonitoring equipment (Grass/Telefactor, Nicolet Biomedical, Bio-logic,and others) and evaluated by the physician to determine the zone(s) ofepileptogenesis.

[0051] In addition to monitoring, electrodes 101 may conduct stimuluspulses generated by a stimulator to map the functional areas of thebrain underlying electrode 101. In this manner, the physician is able todetermine the risks and benefits associated with a possible surgicalapproach to treat the patient's epilepsy.

[0052] The external system 100 may also support deep brain stimulationas a treatment for intractable epilepsy. DBS leads may be placed withinstructures of the brain (e.g., thalamic nuclei, subthalamus, temporallobe, etc.) to enable the continuous or intermittent delivery ofelectrical stimulation to structures that may have a network or localeffect on areas of epileptogenesis. ECoG recordings may also be obtainedfrom the DBS leads.

[0053] When the system 100 is set up with the EMU, the externalized endsof the implanted electrodes 101 will connect directly to the bedsidedevice 107. The raw signals collected by the electrodes 101 connected tobedside device 107 are processed by the external system 100 and passedto existing EMU preamplifier 103 and into EMU data collection system105. Additional electrode connections may occur directly between thepatient and existing EMU preamplifier 103 and data collection system105, bypassing the external system 100, to enable recording from agreater number of electrode contacts than used by bedside device 107. Bymeans of a serial cable 111, the bedside device 107 interfaces with theprogrammer 109 through which system programming, data display, andreal-time and/or retrospective analysis may take place.

[0054]FIG. 2 is a schematic block diagram depicting the bedside device107, which is a component of the external system 100. The bedside device107 comprises a sense electronics module 201 for processing (i.e.,amplifying and digitizing) the sensed neurological signal, a stimulationelectronics module 203 for providing treatment therapy, a hardwareinterface processor 205 for controlling the sense and stimulationelectronics modules and passing the digitized EEG data to a signalprocessor 207 (which performs detection algorithm and control systemtiming and operation), a user interface processor 209 for controllingserial data to and from the signal processor 207 and the programmer 109,and a power supply 211.

[0055]FIG. 3 is a schematic block diagram depicting the senseelectronics module 201 associated with the bedside device 107. Senseelectronics module 201 processes EEG signals from the electrodes 101 sothat the EEG signals can be further processed by the signal processor207. A blanking circuitry 301 comprises optically coupled relays.Blanking circuitry 301 provides independent blanking of any channelelectronics (e.g., an amplifier) that is associated with an electrode.Blanking circuitry 301 disconnects the channel received from theelectrode when the electrode is being stimulated. A differentialamplifier 303 provides buffering and isolation from electronicsassociated with other channels by having a high common mode rejection. Anotch filter 305 removes residual 50 or 60 Hz noise signal componentthat may be attributable to powering the external system 100 fromalternating current (AC). A sampling circuitry 307 converts an analogsignal associated with each channel into a digital signal with an analogto digital converter. In the embodiment, sampling circuitry 307 provideseight bit resolution with a 250 Hz sampling rate, an adjustable gain,and adjustable analog filter corners. Those skilled in the art willappreciate that the digital precision and sampling rates may beincreased or decreased according to the particular application or sensedsignal.

[0056]FIG. 4 is a schematic block diagram depicting an embodiment ofblanking circuitry associated with the external control system 100. Anoptically coupled relay 405 is associated with an input 401 and anoutput 403. Blanking circuitry 301 controls relay 405 through controlsignal 407 so that output 403 is isolated from input 401 when theassociated electrode is being stimulated. The circuit also ensures thatthe amplifier input during this time is not floating to prevent driftsin the voltages recorded by the system.

[0057]FIG. 5 is a schematic block diagram depicting the hardwareinterface processor 205 associated with the bedside device 107. Hardwareinterface processor 205 comprises a micro controller 503 to controlblanking circuitry 301, sense electronics module 201, and stimulationelectronics module 203. It also notifies signal processor 207 when datais available for further processing.

[0058]FIG. 6 is a schematic block diagram depicting the signal processor207 associated with the bedside device 107. Signal processor 207comprises a processing engine 601 (e.g., Analog Devices ADSP2189M), anSRAM and flash memory 605, which is used for loop recording, a real timeclock 603, which is used for associating a time with loop recording, anda boot flash memory 607, which loads a program on powering up signalprocessor 207.

[0059]FIG. 7 is a schematic block diagram depicting the user interfaceprocessor (UIP) 209 associated with the bedside device 107. A processor701 receives data and commands through user buttons 703. Processor 701may be a single device or may consist of multiple computing elementssuch as a Digital Signal Processor (DSP). The UIP 209 may provide aRS-232 interface 709 between the programmer 109 and the processor 701.Moreover, a component of the UIP 209 and processor 701 may communicatewith each other to convey other information (such as button press datafrom user buttons 703 to the processor 701, and icon status data fromthe processor 701 to an LCD display 705). Processors (e.g., DSPs)associated with processor 701 may also utilize analog circuitry.Additionally, RS-232 interface 709 enables information to be sent toprocessor 701 from the user. Processor 701 responds to the data andcommands from the user by displaying and updating a menu display on theLCD display 705. The patient may input a marker, signifying an eventsuch as a seizure, through isolated patient marker 707. An alarm 711 mayalert the user or the patient about an event such as a detected orpredicted seizure.

[0060] As discussed, the external system may be implemented with thespecific application of treating epilepsy by electrical stimulation ofthe brain using, as one of the possible options, closed-loop controlbased on monitoring of electrical activity in the brain. In such anembodiment, a seizure detection algorithm may be utilized to monitor theelectrical brain activity and predict whether a seizure onset is aboutto occur or detect its onset. In accordance with an embodiment, theseizure detection algorithm is that disclosed in U.S. Pat. No. 5,995,868(entitled “System for the Prediction, Warning, Prevention, or Control ofChanges in Activity States in the Brain of a Subject”). Otherembodiments may utilize variations of the seizure detection algorithm ormay use other detection algorithms for detecting seizures and/or othernervous system disorders. Moreover, the detection algorithm may beadaptable. Discussed below is an overview of a preferred embodiment ofthe seizure detection algorithm followed by an example of how thealgorithm may be adaptable.

[0061]FIG. 8 shows a functional diagram of an example of a seizuredetection algorithm 800 that may be used. Generally, the seizuredetection algorithm 800 is capable of detecting brain activity changesbased on the spectral characteristics, intensity (ratio), spread, andduration of an electrical (EEG, ECoG, and/or EKG) signal 801 that isobtained from a set of electrodes. In the embodiment of external system100, eight ECoG channels may be supported, although other embodimentsmay support a different number of channels. The analog EEG or ECoG datafrom the electrodes 101 are transformed to digital data with an A to Dconverter in the bedside device 107. In the hybrid system 1000, the A toD converter may be in the implantable device 953. A digital filter suchas a finite impulse response (FIR) filter 803 is configured to estimatethe power spectrum density characteristics of a set of electrical brainsignals. A foreground determinator 805 associates a foreground value ofthe signals with a moving foreground interval of a predetermined timelength (e.g., 2-seconds), which may be programmable. In the embodiment,foreground determinator 805 squares the value of each sample in theforeground interval and selects the median value. A backgrounddeterminator 807 associates a background value with a moving backgroundinterval of predetermined time length (e.g., 30 minutes), which againmay be programmable. At any point in time, the current foreground andbackground values are computed, respectively, from the foreground andbackground intervals that immediately precede that time point.Background determinator 807 squares the value of each sample in thebackground interval and selects the median value. The seizure detectionalgorithm 800 then processes the results of background determinator 807through an “exponential forgetting” adjustor 809 that combines theresults with previous results from background determinator 807 toproduce a exponentially-smoothed background value. A module 811 thendivides the foreground value by the exponentially-smoothed backgroundvalue to determine a ratio for each signal from each electrode in aselected electrode group. Module 811 also determines the largest ratiofrom the group of electrodes. The value of the largest ratio is then fedinto a detection criterion module 813, which analyzes the sequence oflargest ratios to determine when an event is detected. Output 814 fromalgorithm 800 includes notification that an event has occurred(“detection”) as well as variables quantifying the event (e.g., ratio,extent of spread, and duration from all electrodes).

[0062] As discussed, the external system 100 may take other formsincluding, for example, a hybrid control system and an implantablecontrol system. The functionalities described herein may be performed byany of these embodiments, in which some of the functionalities may beassociated with different components of the various embodiments.

[0063] HYBRID SYSTEM—FIG. 9 shows an embodiment of a hybrid system 1000for treatment of a nervous system disorder in accordance with oneembodiment of the invention. As discussed, although the hybrid system1000 is discussed in the context of providing brain stimulation fortreating epilepsy, it will be appreciated that the hybrid system 1000may also be used to provide other treatment therapies at other locationsof the body to treat other forms of nervous system disorders.

[0064] Referring still to FIG. 9, leads 951 are coupled at a distal endto electrodes that sense brain activity of the patient and deliverelectrical stimulation to the patient. At a proximal end, leads 951 arecoupled to extension wire system 952 that in turn connects to animplantable device 953. The connection between leads 951 and extensionwire system 952 typically occurs under the scalp on top of the craniumat a convenient location such as behind and above the ear. The distalconnector of extension wire system 952 is designed to accommodate thevarious options for leads 951 which might be selected by the surgeon torecord and/or stimulate from deep within the brain, on the surface ofthe cortex or from electrodes just protruding through the skull or onthe surface of the skull. Extension wire system 952 is passed just underthe skin along the lateral aspect of the neck to connect withimplantable device 953. Leads 951 typically last at least as long asextension wire 952. Extension wire 952 is made of materials that allowit to withstand considerable stress/forces caused by neck movement. Theimplantable device 953 conditions signals, samples the signals, anddelivers electrical stimulation through the electrodes 951. An antenna955 supports telemetric communications between the implantable device953 and an external device 950. The external device 950, which may be anexternal wearable digital signal processing unit, receives sampledsignals from the implantable device 953, detects seizures, and sendssignals to the implantable device 953 to initiate stimulation therapy.

[0065]FIG. 10 is a schematic block diagram of the external device 950for the hybrid control system of FIG. 9. The external device 950communicates (continuously or intermittently) with the implantabledevice 953 over a telemetry link 1001 through an uplink/downlink circuit1003 or through a cabling arrangement. The external device 950 mayinterface with a programmer 1021 (such as programmer 209) through RS232interface 1017. The programmer 1021 may be a physician programmer, apatient programmer, or any general-purpose computing device havingsoftware for interfacing with a medical device system.

[0066] An apparatus 1000 (e.g., the external device 950) is powered by arechargeable/replaceable battery 1025 and is voltage regulated by avoltage regulation circuit 1019. A DSP controller 1005 processesneurological data from implantable device 953 and records/storesprocessed data in a boot flash memory 1007 or in a compact flash memory1023, which extends the recording capability of memory 1007. Theapparatus 1000 may be instructed by a user through buttons 1013. Thecorresponding inputted information is received by a peripheral interfacecontrol (PIC) microprocessor 1011 through a RS232 interface 1017. Theuser may instruct the DSP controller 1005 to process, store, andretrieve neurological data through PIC microprocessor 1005. Also, theuser may obtain information (e.g., status and selected processed data)through an LCD screen 1015.

[0067]FIG. 11 is a schematic block diagram of the implantable device 953for the hybrid control system of FIG. 9. An apparatus 1100 (e.g., theimplantable device 953) is implanted in conjunction with a set ofelectrodes 1101. (In the exemplary embodiment shown in FIG. 11, the setof electrodes 1101 comprises eight electrodes.) A reference electrode1103 is another electrode that is not included in the set of electrodes1101 and that is not typically involved with the neurological activityas the set of electrodes 1101. The apparatus 1100 communicates with theexternal device 1000 through a telemetry transceiver 1127, an antenna1125, and a telemetry link 1023. The apparatus 1000 (e.g., the externaldevice 950) may collect data from the apparatus 1100 by placing a patchantenna 955 on the patient's body over the implantable device 953 tothereby communicate with antenna 1125 of the apparatus 1100.

[0068] Each electrode of the set of electrodes 1101 may either receive aneurological signal or may stimulate surrounding tissue. Stimulation ofany of the electrodes contained in the electrode set 1101 is generatedby a stimulation IC 1105, as instructed by a microprocessor 1119. Whenstimulation is generated through an electrode, the electrode is blankedby a blanking circuit 1107 so that a neurological signal is not receivedby channel electronics (e.g., amplifier 1111). When microcontroller 1119determines that a channel shall be able to receive a neurologicalsignal, an analog to digital converter (ADC) 1113 samples theneurological signal at a desired rate (e.g., 250 times per second). Thedigitized neurological signal may be stored in a waveform memory 1115 sothat the neurological data may be retrieved by the apparatus 1000 wheninstructed.

[0069] IMPLANTED SYSTEM—FIG. 12 shows an embodiment of an implantedsystem 10 for treatment of a nervous system disorder in accordance withanother embodiment of the invention. As discussed, although theimplanted system 10 is discussed in the context of providing brainstimulation, it will be appreciated that the implanted system 10 mayalso be used to provide other treatment therapies at the brain or heador at other locations of the body. The implanted system 10 generallyincludes an implanted device 20 coupled to one or more therapy deliveryelements 30. The therapy delivery elements 30, of course, may also serveas monitoring elements to receive a neurological signal. The implanteddevice 20 may continuously or intermittently communicate with anexternal programmer 23 (e.g., patient or physician programmer) viatelemetry using, for example, radio-frequency signals. In thisembodiment, each of the features and functionalities discussed hereinare provided by the implanted device 20.

[0070] Those skilled in the art will appreciate that the medical devicesystems described above may take any number of forms from being fullyimplanted to being mostly external and can provide treatment therapy toneural tissue in any number of locations in the body. For example, themedical device systems described herein may be utilized to provide vagalnerve stimulation, for example, as disclosed in U.S. Pat. No. 6,341,236(Osorio, et al.). In addition, the treatment therapy being provided bythe medical device systems may vary and can include, for example,electrical stimulation, magnetic stimulation, drug infusion (discussedbelow), and/or brain temperature control (e.g., cooling). Moreover, itwill be appreciated that the medical device systems may be utilized toanalyze and treat any number of nervous system disorders. For example,various U.S. patents assigned to Medtronic provide example of nervoussystem disorders that can be treated. In the event that closed-loopfeedback control is provided, the medical device system can beconfigured to receive any number of neurological signals that carryinformation about a symptom or a condition or a nervous system disorder.Such signals may be provided using one or more monitoring elements suchas monitoring electrodes or sensors. For example, U.S. Pat. No.6,227,203, assigned to Medtronic, Inc., provides examples of varioustypes of sensors that may be used to detect a symptom or a condition ora nervous system disorder and responsively generate a neurologicalsignal and is incorporated herein in its entirety.

[0071] As an example to illustrate other embodiments of treatmenttherapies, FIG. 13 shows a medical device system 110 that may beimplanted below the skin of a patient for delivery of drug to a patientas the form of treatment therapy. Device 10 has a port 14 into which aneedle can be inserted through the skin to inject a quantity of a liquidagent, such as a medication or drug. The liquid agent is delivered fromdevice 10 through a catheter port 20 into a catheter 22. Catheter 22 ispositioned to deliver the agent to specific infusion sites in a brain(B), although any location in the body may be utilized. As it relates tothe delivery of drug, device 10 may take a form of the like-numbereddevice shown in U.S. Pat. No. 4,692,147 (Duggan), assigned to Medtronic,Inc., Minneapolis, Minn. and is incorporated herein in its entirety. Thedevice 10 may be augmented to provide the various functionalities of thepresent invention described herein.

[0072] Discussed herein are various features and functionalities thatone or more of the above-described medical device systems mayincorporate. Where applicable and although not required, these featuresand functionalities will be described in the general context ofcomputer-executable instructions, such as program modules. Generally,program modules include routines, programs, objects, scripts,components, data structures, and the like that perform particular tasksor implement particular abstract data types. Moreover, these featuresand functionalities may reside in any number of locations within themedical device system including either one of the implanted componentsand/or one of the external components.

[0073] Relaying Module for Treatment of Nervous System Disorders

[0074] In the hybrid system 1000 and the implanted system 10 embodiment,greater telemetric portability may be achieved between the implantedcomponent and the external component by providing a relaying module.

[0075]FIG. 14 discloses one embodiment of such a relaying module in theform of a device that is worn, for example, on the patient's wrist. Insuch an arrangement, the implanted component 1405 of the medical devicesystem communicates with the relaying module 1415 via telemetry antenna1410. Similarly, the external component communicates with the relayingmodule 1415 via antenna 1420. In the embodiment, a telemetry link 1421between relaying module 1415 and antenna 1420 comprises a 3 MHz bodywave telemetry link. To avoid interference, the relaying module 1415 maycommunicate with the external and implanted components using differingcommunication schemes. In some embodiments, the reverse direction andthe forward direction of telemetry link 1421 may be associated withdifferent frequency spectra. The relaying module 1415 thereby provides agreater range of communications between components of medical devicesystem. For example, in the embodiment of the implanted system 10, theexternal programmer 23 may communicate with the implanted device 20 froma more remote location. The external programmer 23 may be across theroom and still be in communication via the relaying module 1415.Similarly, in the embodiment of the hybrid system 1000, the externaldevice 950 may be located further away than being worn by the patient.With the telemetry booster stage, the use of hybrid system 1000 is moreconvenient to the patient in particular at night while sleeping or whentaking a shower, eliminating the need for the external device 950 to beworn on the body.

[0076] Synchronized and/or Calibrated Clocks Providing Treatment Therapyto a Patient

[0077] Obtaining, processing, storing and using information that evolvesover time and using multiple devices requires adequate timesynchronization between different clocks used by the respective devicesfor meaningful interpretation and use of this information for control orother purposes. With a medical device system, it may be important thatdifferent clocks, in which at least one of the clocks is associated withthe medical device system, be synchronized. For example, propersynchronization is required between an epilepsy monitoring system clockused to timestamp the onset time of a clinical seizure and that of amedical device used to record, analyze and timestamp the subject's brainwaves. Knowing whether particular EEG signal changes precede or followbehavioral changes (and by how long) is important in assessing whetherthe electrodes from which the signal was obtained is at or near theseizure focus. The importance of clock synchronization is furtherexemplified in the discussion of screening below.

[0078] Any one of the above-described medical device systems may beconfigured to provide synchronization and calibration of all systemclocks. (Moreover, the embodiment may support configurations in whichone or more of the clocks are associated with an entity that isdifferent from a medical device system.) Where an embodiment of themedical device system comprises more than one system clock, it maybecome desirable to ensure that the clocks are synchronized with eachother. For example, in the embodiment of the external system 100, thesystem comprises monitoring equipment 105, bedside device 107, andprogrammer 109, in which each component may have separate clocks. Inorder to coordinate the clocks, bedside device 107 provides asynchronization and calibration process that enables the plurality ofclocks to be aligned within a desired accuracy. It will be appreciated,however, that the synchronization process may be implemented within anyother component.

[0079]FIG. 15 shows a top-level flow diagram for a clock synchronizationand calibration process 1500. For clarity, the following discussion isprovided in the context of the external system 100, although otherembodiments are possible. In step 1503, a user initiates a study andsets-up the parameters through programmer 109 in step 1505. In theembodiment, the user enters a selected time (through programmer 109)that is different (which may be greater) than the reference time that isassociated with monitoring equipment 105. (The reference time maycomprise the associated date such month and day.) When the userdetermines that the time associated with monitoring equipment 105 equalsthe selected time, the user synchronizes the clocks in step 1507.Consequently, programmer 109 may generate a control message to bedsidedevice 107 to synchronize the clock of bedside device 107. In theembodiment, the user selects an icon; however, other embodiments may usea Global Positioning System (GPS) clock reference or use a control linefrom monitoring equipment to activate the synchronization of clocks. Instep 1509, programmer 109 determines if the clocks of bedside device 107and programmer 109 were successfully synchronized and notifies the userthrough a real-time data display of programmer 109. In step 1511, theexternal system 100 starts run mode operation in which the medicaldevice system may operate its intended functions.

[0080] During the operation of the external system 100 over time, theclocks of monitoring equipment 105, programmer 109, and bedside device107 may drift with respect to each other. In the embodiment, the clocksof programmer 109 and bedside device 107 are calibrated using the clockof monitoring equipment 105 as a reference. In step 1513, the programmer109 notifies the user that calibration should be performed (e.g., every12 hours, although other time periods may be utilized). The userconsequently enters a selected time (through programmer 109) that isgreater than the present time that is associated with monitoringequipment 105. When the user determines that the time associated withmonitoring equipment 105 equals the selected time, the user calibratesthe clocks in step 1513. With the calibration process, the clocks ofbedside device 107 and programmer 109 are not modified. Rather a “drift”time (equal to the difference between the clock in bedside device 107and monitoring equipment 105) is stored to a file. Data that aresubsequently collected by bedside device 107 can be correlated to thetime of monitoring equipment 105 by adjusting the time of bedside device107 by the drift time. (In the embodiment, the drift time is determinedby the difference between the current time of the second clock and thereference time of the first clock.) However, if the drift time isdetermined to be greater than a predetermined threshold (e.g., onesecond) in step 1515, programmer 109 may notify the user that the clocksneed to be re-synchronized or more frequently calibrated to accuratelytrack the drift between the clocks. If that is the case, the clocks aresynchronized in step 1517.

[0081]FIG. 16 shows specific flow diagrams for clock synchronization andcalibration in relation to FIG. 15. Steps 1601-1609 correspond tosynchronizing the clocks in the external system 100 as shown in steps1507 and 1517. Steps 1611-1619 correspond to manually calibrating theclocks as shown in step 1513. Additionally, as shown in steps 1621-1629,the external system 100 may periodically (e.g., every 10 minutes)calibrate the clocks of the programmer 109 and bedside device 107without requiring intervention by the user. In step 1623, programmer 109retrieves the time from bedside device 107. Programmer 109 compares itstime with the retrieved time from bedside device 107 and calculates anupdated drift time. Programmer 109 stores the adjusted drift time forcorrelating times subsequently. As discussed, synchronization may alsobe utilized in either the hybrid or implanted systems. For example, inthe embodiment of the implanted system, the implanted device may provideto or receive from an external component (e.g., patient or physicianprogrammer, video equipment, testing equipment) a clocksynchronization/calibration signal, and the calibration/synchronizationtechniques discussed herein may be utilized to correspond the implanteddevice with the one or more external devices. Moreover, the clockreference (i.e., the reference clock to which all other clocks would besynchronized/calibrated) may be the clock in the implanted component,one of the external components, a GPS clock, an atomic clock, or anyother reference clock.

[0082] Other embodiments of the invention may determine a delay timebetween initiating the synchronization of clocks and the time that aclock receiving an indication to synchronization of the clock. Forexample, a second clock may receive a command of a radio channel from afirst clock that provides a reference time. The propagation time forreceiving a radio signal is approximately 5 microseconds for eachadditional mile in distance between the first clock and the secondclock.

[0083] With other embodiments of the invention, synchronization of twoclocks may occur on a periodic basis, e.g., every 24 hours. Also, aswith embodiments using an atomic clock or a GPS clock, time adjustmentsthat are associated with time zones may be supported. For example, thefirst clock and the second clock may be located in different time zones.In such a case, the second clock may be synchronized in accordance withthe time zone that the second clock is situated. As another example, thesecond clock may be synchronized to adjust the time in accordance with atransition between standard time and daylight savings time.

[0084] Signal Quality Monitoring and Control

[0085] In accordance with another feature of the present invention, anyone of the above-described medical device systems may be programmed sothat it may monitor received neurological signals and analyze them todetermine their quality. If a parameter of the received neurologicalsignal for a particular monitoring element falls outside a certain rangeindicative of a degraded signal, the medical device system may recognizethe signal as having poor quality until such time as the signal isrestored to sufficiently good quality. Upon making the determination ofpoor quality, for example, the medical device system may decide toremove the signal from consideration in providing closed-loop feedbackcontrol. Alternatively, such signal quality monitoring may be utilizedfor data analysis in which case the degraded signal would be removedfrom consideration in the processing for data analysis. The sensedsignals and quantitative analysis of their quality may also be providedto a treating physician or the medical device manufacturer. In addition,such entities and/or the patient may be notified of the existence of adegraded signal and/or that the signal has been removed from processing.This feature thereby removes from processing any neurological signalduring periods when the signal quality is “sufficiently poor” and toresume processing of the signal once it is restored to “sufficientlygood quality.” For example, in the above-described application of aseizure detection system, a signal received from an electrode is removedfrom being provided as an input to the seizure detection algorithmduring the time period that it is determined that the signal is of poorquality. For example, a signal having “clipping” (i.e., flatline) datamay be indicative the signal exceeding voltage limits of the medicaldevice system or experiencing amplifier saturation clipping.

[0086] The medical device system may calculate one or more variablesthat quantify the quality of the neurological signal received from eachof the monitoring elements. For each variable, data points of thereceived neurological signal may be gathered and analyzed within a givenmoving window. The percentage of data points with associated signalquality variable falling above or below a predetermined range may bedetermined and monitored as the window moves with time. The resultingpercentage values will be numbers between 0 and 100, representingquality, so that the medical system can quantify the quality of eachassociated window of data points. The medical system may use thecomputed quality to accept or reject data during monitoring. Dependingon the embodiment of the medical device system, this process may beimplemented as software modules within any one of the components of theexternal system, either the implantable device 953 or the externaldevice 950, or within the implantable system 10. Each quality variableof the received raw neurological signal, or processed signals obtainedthrough some transformation of the neurological signals to be used insubsequent processing, may be continuously and independently monitored.Separate software modules may exist for each quality variable of thesignals being monitored.

[0087] As an example, the medical device system may monitor excessiveflat-lining, which is distinguishable from that which may occur pre- orpost-ictally, for a particular neurological signal. For example, adegraded signal may be one in which 40% of the signal values are clipped(e.g., 40% of the data points within the moving window are at the upper“rail”). Such a signal may be considered of poor quality and henceundesirable, as compared to one that has no clipping or only minimalclipping (e.g., 4-5%). The medical device system may therefore takeinstantaneous signal quality measurements and performexponential-smoothing or some other averaging over a moving window. Thelength of the moving window may vary for different embodiments or overtime and can have a 60-second duration in one embodiment. The medicaldevice system may thereby compare the level of change between twoadjacent data points in the moving window. If the data points' “qualityvariables” are within a predetermined value of each other, it isindicative of flat-lining. For example, if two adjacent data points areless than 2 bits of signal digital precision from (or, alternatively,within 10% of) each other, it may be determined to be indicative ofinstantaneous flat-lining. Another indication of flat-lining is wheresignals from two adjacent monitoring elements are identical. The medicaldevice system may therefore ignore or substitute signals from a specificelectrode if the number of flat-line data points in a given rollingwindow exceeds a predetermined amount or percentage relative to thetotal number of data points in the time window. Once the number offlat-line data points falls below a second (typically lower)predetermined amount, the medical device system may then re-enable thesignal from that electrode to be used for processing (e.g., dataanalysis or closed-loop feedback control). The system may also providenotification to the physician and/or the patient of these events such asa sensory signal (e.g., alarm). Alternatively, the signal experiencingpoor signal quality removed from processing may be replaced with asubstituted signal. The substituted signal may be, for example, a signalthat provides typical signal characteristics or may provide signalcharacteristics received from a neighboring monitoring element.

[0088] More particularly, a neurological signal is instantaneouslyflat-lined if the two-point signal differential is sufficiently small,i.e., if:

|x _(K+1) −x _(k) |≦C ₁

[0089] where C₁ is a specified parameter of the method. For example,C₁=0 causes clipping to be defined in the case of a strictly zero signaldifferential. Setting C₁ slightly larger than zero (e.g., correspondingto a few bits of precision in the input signal) allows potentiallyundesirable flat-lining that isn't exactly zero in differential to alsobe detected. Even if the signal is of good quality, there may still bepairs of data points that will satisfy the above definition of beinginstantaneously flat-lined. This can occur, for example, around localextrema of the signal (when the first derivative is supposed to bezero). To allow the system to ignore such instances, a time-average ofthe indicator function of instantaneous flat-lining is provided. Tominimize memory requirements and computational effort, the time-averagemay be implemented using exponential forgetting. In this manner, thesystem generates a flat-line-fraction signal, which may be interpretedas the fraction of time that the signal was flat-lined in the mostrecent time window. The flat-line-fraction signal is initialized tozero, and has a value in the interval [0,1] at all times. The timescaleof the moving window (i.e., its effective length) is determined by anexponential forgetting parameter, λflat, and may be quantified by thecorresponding half-life of the exponential forgetting. The signalsampling rate, Fs, describes the relationship between λflat and thehalf-life, T½ as: 0.5 = λ_(flat)^(T_(1/2)F_(S))

[0090] The parameters λ_(flat) and C₁ should be chosen to ensure thatthe window of monitoring for the flat-line detection is sufficientlylong to avoid disabling analysis for seizure detection just prior to anelectrographic seizure that is preceded by signal quieting that may be atypical seizure onset precursor for the subject under study. Theflat-line-fraction signal is next analyzed to determine whether or notthere has been excessive flat-lining. This is accomplished by settingtwo thresholds: (1) “bad-fraction” where processing of the correspondingsignal is disabled if the flat-line-fraction signal exceeds thisthreshold level; and (2) “restore fraction” where processing isre-enabled if it had been previously disabled, provided theflat-line-fraction signal has crossed back below this threshold level.

[0091] To illustrate signal flat-lining, FIG. 17 has been provided. FIG.17A illustrates a signal containing flat data. FIG. 17A shows a signalthat exhibits a portion of flatline data. Flatline line data may occurwhen the signal exceeds voltage limits (as indicated by“flatline-clipping”) or may occur when the signal does not exceedvoltage limits (as indicated by “flatline”). In the latter case,possible reasons may be that a lead is broken or that a lead is shortedto a ground potential. FIG. 17B shows a graph of the correspondingindicator function of instantaneous flat-lining. FIG. 17C shows a graphof the resulting flat-line-fraction signal with a λ_(flat) parametercorresponding to a 0.5 second half-life. The threshold values for“bad-fraction” and “restore good-fraction” are also shown as 0.5% and0.35%, respectively. FIG. 17D shows the output of the flat-line detectormodule which is set to “1” at times when the signal is determined tohave excessive flat-lining and zero otherwise. One skilled in the artwill appreciate that many other forms of poor signal quality can besimilarly defined and detected using instantaneous quality variables andweighted time-averaging (e.g., the preferred exponential forgetting),followed by application of threshold criteria in order to disable andre-enable subsequent analysis/processing utilizing the resulting longertimescale signal quality assessments. Two very similar qualityassessments arise from quantifying signal “clipping” or amplifiersaturation at the maximum and minimum ranges, respectively, of ananalog-to-digital converter. The fraction of time the signal spends onthe maximum and minimum rails of the amplifier can be measured on anydesired timescale and incorporated into the signal quality controlsystem.

[0092] As another example, a neurological signal parameter that may bemonitored for signal quality is a “mains” artifact, namely an excessivenoise at a certain frequency, for example, approximately 60 Hz. Such asignal may be indicative of outside noise interference (e.g., caused byturning on a lightbulb) and may be indicative of a faulty orhigh-impedance electrode. Of course, the frequency may vary. Forexample, in European countries, the AC noise interference has afrequency of approximately 50 Hz. The medical device system may measureinstantaneous amplitudes of the signal and calculate a running averagefor a given moving window, of 60 seconds duration. Once it is determinedthat the average frequency or amplitude of the signal is excessive,namely above a predetermined threshold, the medical device can removethe associated electrode from consideration in the data analysis process(e.g., a seizure detection algorithm). Once the average frequency oramplitude of the signal returns below a second (typically lower)predetermined level, the associated electrode may then be brought backinto consideration.

[0093] The process for detecting excessive 60 Hz. “mains” artifact issomewhat similar to that used in detection of clipping. The differenceis that instead of computing a clip-fraction signal at each point intime, an estimate of the current amplitude of the 60 Hz component in therecorded signal is calculated, again, smoothing the estimate viaexponential forgetting. The output of this smoothing is interpreted asthe average 60 Hz amplitude in the most recent time window (with a timeconstant determined by the half-life associated with the 60 Hz.exponential forgetting factor parameter). As before, the monitoredneurological signal is considered bad/broken (disabling analysis of thesignal) if the average 60 Hz. amplitude exceeds one threshold and islater considered good/fixed if it returns back below the same or adifferent threshold.

[0094] The instantaneous estimate of the amplitude of the 60 Hz.component of the input signal is obtained by first applying a digitalfilter to the input signal to remove energy from frequencies other than60 Hz, leaving only the 60 Hz component of the received signal. This maybe done using a 3 tap FIR filter that is the complement of a 60 Hz notchfilter. This filter may not be sufficiently sharp in the frequencydomain and may incorrectly detect, for example, a high frequencycomponent present in a seizure as 60 Hz and disable processing of thesignal (and thus miss potential detection of the nervous systemdisorder). Accordingly, an IIR filter or a longer FIR filter may beutilized to obtain additional specificity in the frequency domain. Asimilar approach may be taken to produce a 50 Hz. artifact detector (forexample, for use in Europe).

[0095] After the 60 Hz component of the input signal has been extracted,the amplitude of the wave is estimated by computing the square root oftwice the four point moving average of the square of the filteredsignal. The reason behind this is easily derived from trigonometry andomitted here. The instantaneous estimate of 60 Hz amplitude may have arelatively large variance due in part to the fact that the estimates areeach completely derived from four data points of information. Thesequence of instantaneous estimate is therefore smoothed, utilizingexponential forgetting for memory and computational efficiency, toproduce a signal, “amp60est,” that tracks the time-varying amplitude of60 Hz noise present in the signal. The amp60est signal is interpreted asa time-average of this noise over a recent time window (the length ofthe window may be determined by the half-life of the exponentialforgetting parameter, λ₆₀).

[0096] The amp60est signal is next analyzed to determine whether or notthere has been excessive 60 Hz noise in the recent signal. This isaccomplished by setting two thresholds: (1) “amp60bad” where processingof the corresponding signal is disabled; and (2) “amp60restore_good”where processing is re-enabled if it had been disabled, providedamp60est has crossed back below this threshold level.

[0097] Other than an IIR or FIR filter, an alpha detector may be createdby using a filter in the 8-13 Hz band. In this event, it may bedesirable to ensure that the approach used to estimate the amplitude ofa single frequency sine wave was adapted or verified to work forestimating total power of the portion of signal in the particularfrequency band, and that the resulting system was validated againstexpert visual analysis. The use of this filter is restricted tonon-epileptogenic regions so as not to impair the process of seizuredetection or quantification since 8-13 Hz signal components may bepresent in seizures.

[0098]FIG. 18A shows a 10-second segment of ECoG data (with a seizurebeginning at t=5 seconds). FIG. 18B illustrates the same ECoG signalsegment, but contaminated by an excessive 60 Hz artifact (0.1 mV noise,beginning at t=2 seconds and ending at t=7 seconds). FIG. 18Cillustrates the 60 Hz component of the noisy signal, extracted via the 3pt. FIR filter with coefficients [0.5, 0, −0.5] (using a MATLAB filterconvention for coefficient ordering and sign). FIG. 18D shows a graph ofthe instantaneous (i.e., 4-point) estimate of 60 Hz. amplitude (1805),along with the resulting “amp60est” signal (1810), computed using theparameter λ₆₀=0.9942 (corresponding to a 0.5 second half-life atsampling rate Fs=240 Hz). The threshold values for “amp60bad” and“amp60restore_good” are also annotated as 0.075 mV and 0.035 mV,respectively. FIG. 18E shows the output of the 60 Hz. artifact detectormodule, which is set to one at times when the signal is determined tohave excessive 60 Hz. noise and zero otherwise.

[0099] It will be appreciated that the clipping artifact and the 60 Hzartifact are examples of signal quality that can be monitored. Stillother features of the recorded signal, such as signal wave shape (e.g.,smoothness indexes), may also be considered. Processing of signal waveshapes would determine artifactual waves unlike those generated by thebrain such as portions of a signal with straight lines, sharp angles, orlacking any variability.

[0100] For example, poor signal quality may be determined when onesignal is significantly different from another signal in some respect,but wherein the corresponding electrodes are physically near each other.In this example, power may be calculated and a poor signal may be thecause if one signal exceeds the bounds for what is expected for signalsfrom adjacent electrodes, or if the absolute-value of the correlationcoefficient between the two signals is low, when it would, by thespatial closeness of the electrodes, be expected to be higher.

[0101] A maximal amount of poor quality data that is tolerable may bequalified using different criterion. Poor quality data may be gauged bya signal power to noise power ratio (S/N) that is associated withneurological data. Also, poor quality data may be gauged by a fractionof the foreground window that contains a noisy signal. Typically, theforeground window is more vulnerable to noise than the background windowsince the foreground is determined over a shorter time duration. One mayalso consider different artifacts. Movement artifacts may be detectedwith accelerometers, in which corresponding outputs may be used toreduce or even cancel the movement artifacts. Other types of artifactsthat may be consider include EKG artifacts and disconnection artifacts.EKG artifacts, when recorded from intracranial electrodes, are anindication of high impedance. Disconnection artifacts may be identifiedby stationary noise in one lead or a set of leads. The characteristicsof a baseline that are associated with neurological data may assist inidentifying a cause of poor quality data. For example, a flat linewithout a shift in the baseline and without noise may be indicative thatan amplifier has been deactivated or has failed.

[0102] Screening Techniques for Management of a Nervous System Disorder

[0103] The medical device system may have a mode of operation forperforming screening of a nervous system disorder. The system maythereby make decisions about the patient's options for management of thenervous system disorder. For clarity, the following discussion isprovided in the context of the external system 100, although otherembodiments are possible. In the discussion, a neurological signal maybe an EEG signal that is sensed by one or more monitoring electrodes.However, in other embodiments of the invention, a neurological signalmay be provided using other types of monitoring elements such as one ormore sensors. Treatment therapies may include any number ofpossibilities alone or in combination including, for example, electricalstimulation, magnetic stimulation, drug infusion, and/or braintemperature control. During screening, the medical device system mayperform various operations. For example, in the embodiment of treating aseizure disorder, the system may identify a patient's seizure focus orfoci by determining portions of the brain that are associated with aseizure. In general, the neurological event focus is the anatomiclocation where the neurological event originates. Accordingly, themedical device system may identify electrode placement that may provideeffective therapy and provide recommendations on which sensing andstimulation combinations are more effective than other sensing andstimulation combinations. The recommendations may utilize a focaltherapy assessment that is effective if the extent of electrographicspread is contained in the seizure focus and does not spread elsewhere(i.e., partial seizures). Alternatively, the recommendation may utilizea remote therapy assessment that is effective if seizure relatedelectrographic activity originates in the seizure focus and propagatesto other brain regions (i.e., secondarily generalized seizure types).Moreover, the medical device system may assess whether closed-looptherapy will be effective.

[0104]FIG. 19 shows a simulated EEG waveform 1901, designating an onsetof a neurological event. A time event 1903 corresponds to aninvestigator time of electrographic onset (ITEO), in which a clinicianobserves significant electrographic activity that may predict aneurological event such as a seizure. (However, a neurological event maynot follow time event 1903 in some cases.) A time event 1905 correspondsto an algorithm detection time (ADT), in which a detection algorithm ofexternal system 100 detects an occurrence of a neurological event. Inthe embodiment, as is discussed in the context of FIG. 20, the ITEO andthe ADT are compared. The difference between the ITEO and the ADTprovides a measure of the detection algorithm's delay of detection fordetecting a neurological event. In general, it is desired for the delayof detection to be as small as possible with sufficient accuracy ofpredicting the neurological event. In order to accurately determine thedifference between the ITEO and the ADT, associated clocks should besufficiently synchronized (as is discussed in the context of FIG. 15).

[0105] A time event 1907 corresponds to a clinical behavior onset time(CBOT), in which a patient manifests the symptoms of the neurologicalevent (such as demonstrating the physical characteristics of a seizure).(In some cases, the patient may not manifest the symptoms even though anITEO occurs.) Typically, if monitoring elements (such as electrodes) areappropriately positioned, the CBOT will occur after the ITEO. However,if the electrodes are placed away from a point of the neurologicalevent, the CBOT may occur before the ITEO because of a delay of theneurological signals propagating through different portions of thepatient's brain. A time event 1909 corresponds to an investigatorseizure electrographic termination time, in which the electrographicactivity sufficiently decreases.

[0106] To illustrate an embodiment of a screening procedure for aparticular nervous system disorder, FIGS. 20 and 21 show flow diagramsfor a seizure screening process to define treatment therapy according toan embodiment of the invention. Process 2000 comprises a baselinealgorithm monitoring sub-process 2003 (comprising steps 2005-2049) and atrial screening sub-process 2151 (comprising steps 2153-2179). In step2002, a physician implants electrodes into a patient in order to conductprocess 2000.

[0107] In step 2005, a medical device system processes neurologicalsignals (e.g., EEG inputs) that are sensed by the implanted electrodes.If a detection algorithm (that is utilized by the medical device system)detects a seizure in step 2007, a location of the seizure, ascharacterized by a seizure focus location, is determined by step 2009and comprising sub-step 2011 and sub-step 2017. (In the discussion,herein, a “step” may comprise a plurality of “sub-steps.” For example,when performing step 2009, process 2000 performs both sub-steps 2011 and2017. One should not construe sub-steps 2011 and 2017 as being distinctfrom step 2009.) In sub-step 2011, the medical device system identifiesthe seizure focus location by identifying the channel(s) (correspondingto an implanted electrode) with the earliest onset in which apredetermined ratio threshold is crossed. In some neurological events,several foci may be identified. Also, a patient may experience aplurality of neurological events, which are associated with differentfoci. In sub-step 2017, the medical device system reports at least oneseizure onset location through an output device.

[0108] In step 2019 (comprising sub-step 2021 and sub-step 2025) anextent of the seizure's spread, intensity, and duration are determined.In sub-step 2021, the medical device system identifies channels that are“involved” in the seizure in order to determine an electrographic spreadof the seizure. (A criterion for channel involvement and electrographicspread is discussed in the context of FIG. 22.) The medical devicesystem reports the electrographic spread, intensity, and duration to thephysician in sub-step 2025. The medical device system may present agraphical representation of the patient's brain to an output device forthe physician's viewing. The graphical representation highlights thelocation and the extent of the seizure focus (such as by distinguishingthe portion of the brain that is neurologically involved in the seizurewith a different color from other portions of the brain.) The graphicalimage may be three dimensional and may present a sequence of images as afunction of time, where each image represents the portion of the braininvolved in the seizure at that particular point in time (seizureanimation). Such a sequence of images graphically displays the manner inwhich the seizure spreads through the patient's brain from onset untiltermination (seizure animation).

[0109] In step 2027, which comprises sub-steps 2029 and 2031, thecorrectness of electrode placement for seizure detection is verified. Insub-step 2029, the ITEO (investigator time of electrographic onsetcorresponding to time event 1903 in FIG. 19) and the CBOT (clinicalbehavior onset time corresponding to time event 1907 in FIG. 19) areprovided to the medical device system. (In the embodiment, step 2027 isoptional so that the clinician need not provide ITEO and CBOT to themedical device system.) In sub-step 2031, the medical device systemdetermines if the ITEO did not occur after the CBOT. In the embodiment,the fact that the CBOT occurs before the ITEO is indicative that theselected electrodes are not sufficiently near the focus. In such a case,step 2032 determines whether to stop screening. If so, screening isended in step 2034. Otherwise, step 2004 allows the physcian toreposition subdural and/or DBS electrodes. The baseline algorithmmonitoring sub-process 2003 is repeated.

[0110] If sub-step 2031 determines that the ITEO does not occur afterthe CBOT, step 2033 is executed, in which a localization accuracy andspeed of detection are determined. Step 2033 comprises sub-steps 2035,2037, and 2039. (In the embodiment, step 2033 is optional so that theclinician need not provide ITEO and CBOT to the medical device system.)In sub-step 2035, a spatial difference is determined between a ADT onsetchannel (i.e., the channel that the detection algorithm associates withthe onset of the seizure) and a ITEO onset channel (i.e., the channelthat is first associated with neurological activity as determinedthrough visual analysis). While the ADT onset channel may be differentthan the ITEO onset channel, an event of the ADT onset channel and theITEO onset channel being the same is indicative of localizationaccuracy. In sub-step 2037, the medical device system reports thespatial difference and whether the spatial difference exceeds apredetermined limit. The spatial difference exceeding the predeterminedlimit may be indicative that algorithm adaptation should be executed asin step 2041. In addition, in step 2039, a measure of the algorithm'sdetection delay is determined by calculating the difference between thetimes associated with the ADT and the ITEO. If the detection delay issufficiently large, algorithm adaptation may be executed in step 2041.

[0111] Step 2041 determines whether to adapt the detection algorithm. Ifnot, step 2048, as describer later, is executed. If so, step 2043enables the physician to provide a training set (e.g., cluster data forprevious seizures) so that the detection algorithm may enhanceperformance by adjusting its parameters. The use of filter adaptationfor detecting seizures is disclosed in U.S. Pat. No. 5,995,868 entitled“System for the Prediction, Rapid Detection, Warning, Prevention, orControl of Changes in Activity States in the Brain of a Subject” and isincorporated herein in its entirety. In sub-step 2043, the physicianidentifies collected neurological data that characterizes the seizure(e.g., one or more detection clusters that are associated with theseizure). The detection algorithm may be adapted using differentmethods, as requested by the physician or automatically (unsupervisedlearning). With one variation of the embodiment, the detectionalgorithm, in step 2044, is adapted by adjusting threshold and timeduration settings in order to approximately optimize seizure detectionin relation to the data identified in sub-step 2043. In step 2045, thephysician evaluates the adaptation results. In step 2046, if theadaptation is satisfactory, the physician may accept recommendedsettings through an input device in step 2047. However, if theadaptation is not satisfactory, as determined by step 2046, step 2048 isexecuted to determine whether to record more seizures. If so, baselinealgorithm monitoring sub-process 2003 continues to execute forsubsequent seizures. Otherwise, process 2000 proceeds to trial screeningsub-process 2151.

[0112] In a variation of the embodiment, user interaction may be reducedor even eliminated in some or all of the steps. For example, in steps2045-2047, a set of predetermined criteria may be used in order todetermine whether adaptation is satisfactory. Criteria may include speedof detection and detection falsing. Thus, the degree of automation maybe increased or decreased for process 2000.

[0113] In step 2153, the physician inputs an electrode configuration inaccordance with the electrographic spread and the seizure focus locationthat is presented to the physician in steps 2017 and 2025. In anotherembodiment of the invention, the medical device system provides arecommendation of the electrode configuration to the physician inaccordance to the electrographic spread and the seizure focus location.The physician may accept, reject, or modify the recommendation. A“perform_manual_stimulation” step 2155 comprises sub-steps 2159 and2161. The physician defines electrode polarities and stimulationparameters. (In an embodiment, an electrode polarity may be classifiedas a stimulation parameter. Also, some embodiments may utilize the canor case of the medical device as one or more electrodes (or as contacts)for recording and/or stimulation purposes.) Programmer 109 may providesuggested values based on the location of the electrodes and anhistorical compilation of values that have been accumulated through theevaluation of many patients. In sub-step 2159, therapy is administeredby delivering stimulation to the patient. If the physician notes anyadverse reaction to the treatment, the physician inputs an indication tothe medical device system in sub-step 2161 indicating correspondingsymptoms or changes that the patient shows. The medical device systemqueries the physician whether to modify any of the therapy parameters instep 2163 and the electrode configuration in step 2165. Step 2155 andsub-steps 2159 and 2161 are repeated if different stimulation parametersare tried in response to step 2163. Step 2153 is repeated if differentelectrodes are tried in response to step 2165. Alternatively, themedical device can recommend changes to the parameters.

[0114] If the physician indicates that the stimulation settings and theelectrode configuration should be used, the medical device systemapplies treatment in step 2167. The medical device system or thephysician determines whether the therapy is considered successful instep 2168 by a set of criteria. In the embodiment, the medical devicesystem determines if there is a sufficient reduction of a detectedfrequency, duration, intensity, and extent of the electrographic spreadthat are associated with the seizure.

[0115] If the therapy is not deemed successful in step 2168, algorithmadaptation may be performed in step 2170. Step 2170 essentiallyfunctions as in step 2041. If step 2170 determines that algorithmadaptation shall not be performed, step 2171 is next executed.Otherwise, step 2172 determines whether algorithm parameters shall bechanged. If so, step 2167 is executed; otherwise, step 2171 is executed.In step 2171, the electrodes may be reconfigured and step 2153 may berepeated. In a variation of the embodiment, restimulation of electrodesmay be expanded to electrodes that are involved in the seizure otherthan the first or second electrode as determined in sub-step 2021. Ifsubsequent trial screening shall not try different electrodes orstimulation settings (as determined by the physician), sub-process 2151is completed and the electrodes may be explanted. If the therapy isdeemed successful in step 2168, sub-process 2151 is completed.

[0116] In step 2168, the medical device system may compare the detectedfrequency, duration, intensity, and extent of the electrographic spreadthat is collected during baseline monitoring algorithm sub-process 2003(as shown in FIG. 20) with the corresponding results that are collectedduring trial screening sub-process 2151. However, with stimulation,which is associated with trial screening sub-process 2151 but not withbaseline monitoring algorithm sub-process 2003, blanking is generatedduring different time intervals, in which data is not collected becauseof signal artifacts. (Further detail is presented in the context of FIG.23.) During intervals of blanking, corresponding data (which may beassociated with neurological signals provided by electrodes beingblanked and by adjacent electrodes) is not compared between baselinemonitoring algorithm sub-process 2003 and trial screening sub-process2151. If the difference between corresponding data, with and withoutstimulation, is sufficiently large (e.g., the difference is greater thanan efficacy requirement), then the therapy is determined to besuccessful.

[0117] In other embodiments of the invention, in step 2169, a physicianmay evaluate a reason for the therapy deemed as not being successful.Consequently, the physician may instruct external system 100 to performalgorithm adaptation in step 2170. Alternatively, the physician mayinstruct external system 100 to bypass step 2170 and to perform step2171, in which the electrodes are reconfigured.

[0118] With a variation of the embodiment, the medical device system mayapply stimulation every n^(th) block of detection clusters and/or everyn^(th) detection cluster (which is discussed in the context of FIG. 22)during trial screening sub-process 2151. Corresponding data (e.g.,detected frequency, duration, intensity, and extent of theelectrographical spread) is collected for both detection clusters, inwhich stimulation is applied, and detection clusters, in whichstimulation is not applied. Because blanking is generated duringdifferent time intervals when stimulation occurs, corresponding data isnot collected during the corresponding time intervals for detectionclusters, in which stimulation is not applied so that the efficacy ofthe therapy can be evaluated. If the difference between correspondingdata, with and without stimulation, is sufficiently large (e.g., thedifference is greater than an efficacy threshold), then the therapy isdetermined to be successful.

[0119] Other embodiments of the invention may support other typestreatment therapy such as magnetic stimulation, drug infusion, and braintemperature control, in which the efficacy of therapy may be evaluatedby comparing corresponding data between baseline algorithm monitoringsub-process 2003 and trial screening sub-process 2151 or by comparingcorresponding data between detection clusters, in which treatmenttherapy is applied, and detection cluster clusters, in which treatmenttherapy is not applied.

[0120] Configuring and Testing Treatment Therapy Parameters

[0121] The medical device system may have a “manual” treatment therapymode that is different from a normal run mode (automated mode), in thatstimulations may be delivered by the user, in order to test the clinicalefficacy and tolerability of therapy configurations. In the manualtreatment therapy mode, the medical device system may enable the user toselect parameters (i.e., intensity, frequency, and pulse width), therapyelement configurations, to assess charge density, to test treatmenttherapy levels, to insure safety to the patient, and to determineefficacy and tolerability. With parameter selection, the medical devicesystem enables the user to define one or more treatment therapyconfigurations having associations with a combination of treatmenttherapy parameters. For clarity, the following discussion is provided inthe context of the external system 100, although other embodiments arepossible. In the discussion, a neurological signal may be an EEG signalthat is sensed by one or more monitoring electrodes. However, in otherembodiments of the invention, a neurological signal may be providedusing other types of monitoring elements such as one or more sensors.Treatment therapies may include any number of possibilities alone or incombination including, for example, electrical stimulation, magneticstimulation, drug infusion, and/or brain temperature control. In theembodiment where treatment therapy is electrical stimulation, theparameters may include, for example without limitation, duration ofstimulation, intensity (in volts or amps), pulse width, stimulationfrequency, pulse shape etc. With drug infusion therapy, parametersinclude a drug type, a drug dosage, at least one infusion site, infusionrate, and a time of delivering the drug dosage. The user may save eachtested treatment therapy configuration and may identify eachconfiguration by a specified name. In the embodiment, the medical devicesystem verifies that the specified name is associated with a uniqueconfiguration so that two different names are not associated with thesame configuration.

[0122] Before a user-defined treatment therapy configuration is eventested or stored, the medical device system preferably performs a chargedensity check. For example, in the embodiment of electrical stimulationtherapy, the medical device system computes the charge density of thestimulation configuration using the impedance of the electrodeconfiguration, voltage level, stimulation pulse width and contactgeometry of the electrode configuration. The charge density may becomputed using the following formula:

(I·Δw)/(surface area of electrode)

[0123] where I is the current of the stimulation pulse and isapproximately equal to the voltage level divided by the impedance, andΔw is the pulse width. If the calculated charge density exceeds a presetthreshold, the medical device system considers the stimulationconfiguration to be not valid and prevents and/or warns the user fromtesting with the associated stimulation configuration. In a preferredembodiment, the preset threshold is approximately 30μ coulombs/cm²/phaseand can be in the range of up to 500μ coulombs/cm²/phase. The presetthreshold can be programmable and, of course, may vary depending on thenervous system disorder being treated and/or the medical device system.For example, co-pending U.S. patent application Ser. No. 10/099,436,Goetz et al., “Automated Impedance Measurement of an Implantable MedicalDevice,” and filed on Mar. 15, 2002 discloses apparatus and method forautomating impedance measurements of sets of electrodes that areassociated with a lead of an implanted device. Alternatively, in anotherembodiment, the current may be measured directly for each electrode andthe value may be used to compute the charge density.

[0124] The medical device system may also ensure other efficacycriterion are satisfied for any user-defined treatment therapyconfiguration. For example, the medical device system providingstimulation therapy may ensure that the polarities of the stimulationpulses are properly defined, e.g., all polarities cannot be off and thatthe voltage level is greater than zero on at least one stimulationchannel, and that at least one cathode and at least one anode areconfigured.

[0125] If a treatment therapy configuration is within a permissiblecharge density range, the medical device system allows the user to testthe treatment therapy configuration. During a test, the user is able touse a start/stop delivery capability of the medical device system. Ifthe delivery is not terminated by the user, the medical device systemcontinues to deliver treatment therapy for the specified time duration.The medical device system then queries the user whether or not thetreatment therapy configuration was acceptable. The user (e.g., patientor physician care-giver) responds with a “yes” or “no” throughprogrammer 109. In other embodiments, a treatment therapy level that isbeyond the point at which the user stops delivery is considered as nottolerated by the patient. Moreover, the medical device system may insurethat the treatment therapy configuration corresponds to a treatment thatis safe to the patient, where the treatment therapy configuration iswithin a configuration range of safety. Safety to the patient is gaugedby an expectation that the treatment does not diminish the health of thepatient.

[0126] In the embodiment where the medical device system is providingtreatment of seizure disorders, the medical device system operatesseizure detection algorithm 800 in real-time during the manualstimulation mode, as in the normal run mode, but withdetection-triggered stimulation disabled. When selecting stimulationparameters for therapy use, the medical device system allows the user toselect from a list of stimulation parameter configurations, which havebeen previously defined and tested in the manual stimulation mode. Theuser may be restricted to selecting only those stimulationconfigurations that were tolerated by the subject during testing in themanual stimulation mode. Once configured, the medical device system mayreturn to normal mode of operation to provide detection-triggeredstimulation in accordance with the stimulation configuration set by theusers.

[0127] Clustering of Recorded Patient Neurological Activity to DetermineLength of a Neurological Event

[0128] EEG activity, as monitored with a seizure detection algorithm,during a neurological event (such as a seizure) may result in multipleclosely-spaced detections that the user may wish to interpret as beingpart of one event (seizure), and which, if considered as separateevents, may result in an unnecessary or even unsafe number oftreatments. This may be particularly true at the beginning or end of aneurological event time when oscillations around the detection thresholdmay result in multiple closely-spaced detections, which may complicateoperations and logging of events. For clarity, the following discussionis provided in the context of the external system 100, although otherembodiments (as with a hybrid or an internal system) are possible. Inthe discussion, a neurological signal may be an EEG signal that issensed by one or more monitoring electrodes. However, in otherembodiments of the invention, a neurological signal may be providedusing other types of monitoring elements such as chemical or thermalsensors. Treatment therapies may include any number of possibilitiesalone or in combination including, for example, electrical stimulation,magnetic stimulation, drug infusion, and/or brain temperature control. Amedical device system, e.g., external system 100, determines detectionclusters using a temporal criterion, based on the distributions ofdurations of ictal discontinuities or interictal time intervals.Detections that are separated in time by a programmable inter-detectioninterval are assigned to the same cluster unit and deemed as being partof the same seizure as shown in FIG. 22. Clustering parameters areprogrammable.

[0129]FIG. 22 shows data 2201 associated with a maximal ratio 2203 asdetermined by seizure detection algorithm 800 for quantifying a seizure,as represented by a detection cluster 2205. Data 2201 (as obtained froma loop recording generated by bedside device 107) shows maximal ratio2203 from 5 seconds before an onset of detection cluster 2205 to 12seconds after the end of detection cluster 2205. (Other embodiments ofthe invention may determine the occurrence or other types of aneurological event that is associated with a nervous system disorder.)Maximal ratio 2203 (for a given instant in time) is determined from awaveform frame 2251 by identifying an EEG waveform (2253, 2255, 2257, or2259) having the largest ratio at the given instant in time. (The ratioof an EEG waveform at a given time is the largest ratio of a short-termvalue (foreground) divided by a long-term value (background) over a setof neurological signals or channels. (A short-term value or a long-termvalue may be an average value, a median value, or some other statisticalmeasure.) In the embodiment, the short-term value spans the previous 2seconds of EEG data, and the long-term value spans the previous 30minutes or more. Other embodiments may use short-term and long-termvalues spanning different time durations.) For example, at a timeapproximately equal to 10 seconds, waveform 2259 is associated with thelargest ratio, and that ratio is used to construct data 2201 at the samepoint in time. A predetermined threshold 2211 sets a minimum threshold(equal 22.0) for detecting seizure activity. However, a time constraintis predefined such that if data 2201 falls below predetermined threshold2211 and subsequently raises above predetermined threshold 2211 within atime constraint 2215 (which corresponds to 60 seconds in FIG. 22), thenthat subsequent portion of data 2201 is considered to be part ofdetection cluster 2205. Thus, detection cluster 2205 equals duration2207 plus the measured time d1 plus duration 2209. Cluster intensity isdetermined by the largest maximal ratio during detection cluster 2205.

[0130] In the embodiment, the content of abnormal or of signal ofinterest in an ensemble of neurological signals and the prespecifiedthreshold value determines an onset of detection cluster 2205. In such acase, if the “seizure content” of an ensemble of neurological signals isabove predetermined threshold 2211 for a minimum time duration, seizuredetection algorithm 800 determines that detection cluster 2205 hasbegun. However, in other embodiments of the invention, seizure detectionalgorithm 800 may determine that detection cluster 2205 has occurredonly if the neurological signal that first crossed predeterminedthreshold 2211 stays above predetermined threshold 2211 for the minimumtime duration.

[0131] Other embodiments of the invention may use another measure otherthan a ratio to determine an occurrence of detection cluster 2205. Othermeasures include an amplitude of a neurological signal and a magnitudeof a frequency spectrum component (as may be measured by a Fouriertransform) of a neurological signal.

[0132] Waveform 2253, 2255, 2257, or 2259 is considered “involved” in aseizure if the corresponding ratio equals or exceeds predeterminedthreshold 2211. (In FIG. 22, the time duration constraint equalsapproximately 0.84 seconds.) Each waveform in FIG. 22 is associated witha different electrode. In waveform frame 2251, waveforms 2257 and 2259,which correspond to adjacent electrodes, are “involved” in the seizure,and thus the extent of an electrographic spread is two electrodes.

[0133] In the embodiment, external system 100 may numerically indicatethe electrographic spread, as is illustrated in the example above.Moreover, a variation of the embodiment may visually indicate theelectrographic spread by distinguishing an electrode corresponding to awaveform that is “involved” in the seizure. In the variation of theembodiment, a graphical representation of the patient's brain is shownwith the electrodes that are associated with the seizure asdistinguished by a color (such as red). Alternatively, the electrodesthat are not associated with the seizure may be distinguished by someother color. While determining extent of spread requires an applicationof clustering rules, it may be more appropriate to treat spreadseparately.

[0134] As will be discussed in the context of the control of treatmenttherapy, external system 100 may use detection clustering for purposesof delivery and a termination of stimulation or restimulation.

[0135] External system 100 may use information about detection clustersin order to identify circadian or other seizure trends. (Otherembodiments of the invention may support other systems for treatment ofa nervous system disorder, e.g., hybrid system 1000 and implanted system10.) External system 100 may determine whether seizure-related activityoccurs at specific times of the day (e.g., morning, afternoon, or night,and/or at drug administration times) or, in the embodiment of animplanted system, month (e.g., menstrual cycle). Also, external system100 may determine whether there is a cyclical pattern that is associatedwith a patient's seizures as measured by alternating periods ofseizure-dense and seizure-free time intervals. External system 100 mayidentify specific times when intense seizure activity (e.g., seizureclustering) significantly deviates from the patient's mean or medianseizure frequency (i.e., what the patient perceives are clinicalseizures only). External system 100 may produce a seizure trendingreport that identifies whether a trend in seizure activity is present,along with graphical and summary information.

[0136] External system 100 may use information about detection clustersin order to provide measures of an event burden. The event burden may bedetermined by different criteria such as event frequency (a number ofneurological events that a patient is experiencing during a unit oftime), number of detection clusters per unit time, detection clusterseverity (a conjoint measure of the cluster intensity, the clusterduration, and the extent of electrographic spread), and an eventseverity (as determined by a patient's classification of seizureseverity as inputted into external system 100 or ratio).

[0137] External system 100 may adjust therapy parameters, e.g.,stimulation parameters or drug infusion parameters, in order to adjustto the effectiveness of the treatment. The embodiment supports bothintra-cluster staging and inter-cluster staging. With intra-clusterstaging, external system 100 may automatically adjust a therapyparameter (e.g., the stimulation voltage or amperage) with eachsuccessive administration of stimulation within a detection clusteruntil the seizure is terminated. The therapy parameter may be a memberof a predefined set of parameters. At least one predefined set ofparameters may be configured during trial screening sub-process 2151.External system 100 may also automatically adjust therapy parameterswith each successive administration of clustered therapy (i.e.,administration or withholding of therapy based on a cluster).Inter-cluster adjustment may occur at every nth detection cluster oraccording to a cluster sequence pattern (e.g., adjusting therapyparameters only on the second and seventh subsequent detectionclusters). The user may define the cluster sequence pattern using theprogrammer 109. With both intra-cluster staging and inter-clusterstaging, a predefined threshold may be established (such as by the userthrough programmer 109) that limits the adjustment of a therapyparameter.

[0138] External system 100 keeps track of seizure severity measures suchas intensity, duration, and electrographic spread using measures ofcentral tendency or other suitable measures and ranks all detections asa function of intensity, duration, etc, and also as a function of thetemporal evolution of these variables “within a detection cluster” and“between detection clusters”. External system 100 also sorts seizuresaccording to time of day, day of week, week of month, month of year andalso year, using the same variables described above and also accordingto their temporal evolution within and between clusters. Using thesedata, external system 100 creates another rank to track circadian,ultradian and other rhythms and features. If any detection severitymeasure exceeds a certain level, but remains below another level, e.g.,the 99% tile, one or more therapeutic parameters are increased, by apredetermined amount that may vary intra-individually (according to thesubjects seizure statistics) and inter-individually. The number andsequence in which parameters would be increased is also prespecifiedintra- and inter-individually. If the pre-specified type of and sequenceof parameter changes are not efficacious, search methods, e.g., a randomsearch method, may be used to select more efficacious therapy parametervalues, the number of therapy parameters increased at one given time andthe order in which they are increased. External system 100 is programmednot to accept stimulation parameter values that exceed a pre-specifiedcurrent density or the toleration limits as determined in step 1961.

[0139] If one or more measures of seizure activity exceed apredetermined limit at any point in time, e.g., the 99% tile value ofpreceding detections, the event may be an indication that therapy mayhave a paradoxical effect. In such cases, one or more of the therapyparameters may be decreased or the external system 100 may be shut down(temporarily) while gathering more data to reassess the situation. (Inthe embodiment, determining whether to reassess therapy parameters mayoccur at any time during the treatment therapy.) The amount of time thattherapy parameters can be modified may be based on endpoints such asquality of life and/or statistical analysis of the data.

[0140] External system 100 may be capable of changing geometry orconfiguration of stimulation including the number of contacts, as wellas the anode and cathode location. For instance, if stimulation is beingdelivered to contacts 1 and 3 without good results, external system mayadd contact 2 or change to contacts 1 and 4. In addition, stimulationmay be limited to the contacts where an event was detected. Thesedecisions are made using an ability of external system 100 to quantifydetection intensity, duration, etc., at each contact and on the historyof values at each contact. Also, since direction of current flow maydetermine the response to electrical stimulation, the anode and cathodemay be reversed. Or to increase the size of the negative field, theanode may be shifted to a reference electrode of lower impedance (due tolarger surface area such as one of the surfaces of the case containingthe stimulation engine). External system 100 has the capability ofestimating current density at any contact site. Contacts for measuringcurrent density may also be placed at certain sites at a distance fromwhere stimulation is being delivered, in a grid or some other pattern tobetter assess safety and efficacy, by obtaining a more realisticestimate than the one that is routinely obtained at the contact-braininterface.

[0141] The embodiment has described monitoring elements taking the formof electrodes sensing electrical activity associated with brain ECoG.Other embodiments of the monitoring element adapted to sense anattribute of a Nervous System Disorder could be used. Alternatively, themonitoring element could detect abnormal concentrations of chemicalsubstances in one location of the brain. Yet another form of themonitoring element would include a device capable of detecting nervecompound action potentials. The monitoring element also may take theform of a device capable of detecting nerve cell or axon activity thatis related to the pathways at the cause of the symptom, or that reflectssensations that are elicited by the symptom. The monitoring element maytake the form of a transducer consisting of an electrode capable ofdirectly measuring the amount of a particular transmitter substance orits breakdown by-products found in the interstitial space of the centralnervous system. The level of the interstitial transmitter substance isan indicator of the relative activity of the brain region. An example ofthis type of transducer is described in the paper “Multichannelsemiconductor-based electrodes for in vivo electrochemical andelectrophysiological studies in rat CNS” by Craig G. van Horne, SpencerBement, Barry J. Hoffer, and Greg A. Gerhardt, published in NeuroscienceLetters, 120 (1990) 249-252.

[0142] The monitoring element may be external to the body communicatingwith the implanted portions through telemetry. An example of an externalmonitoring element is an electrical device that includes an electrodeattached to the surface of the skin that passes a small current tomeasure the skin impedance. An example of this type of the monitoringelement is described in the paper “Skin Impedance in Relation to PainThreshold Testing by Electrical Means”, by Emily E. Meuller, RobertLoeffel and Sedgwick Mead, published in J. Applied Physiology 5,746-752, 1953. A decrease in skin impedance may indicate an increase inanxiety. Other monitoring elements such as Carbon dioxide gas sensors orother sensors that can detect the physiological parameters such as thoselisted above will be clear to those skilled in the art.

[0143] Control of Treatment Therapy During Start-Up and During Operation

[0144] In an embodiment, any one of the above-described medical devicesystems may limit delivery of therapy during start-up and duringoperation for improved efficacy. During start-up, the medical devicesystem may be programmed to only monitor neurological signals (nodelivery of treatment therapy) for a predetermined time period (e.g., 30minutes) after the medical device system is turned on. Of course, thetime period is a function of the background window length and may varyin duration. During this start-up period, the medical device system maycollect data and allow the seizure detection algorithm system describedabove to stabilize and adjust to data from the individual and set ofsignals being monitored in order establish a background and avoidpotential for erroneous detections (and unwanted administration oftherapy) before such information has been acquired. It has beendetermined that during the period of algorithm stabilization, theprobability of false positive detections is high. Thus, by programmingthe medical device system to not provide treatment therapy during thisperiod, unnecessary treatment therapies can be avoided.

[0145] To illustrate how the treatment therapy can be limited duringstart-up, the embodiment of an external system 100 is described. Theexternal system 100 monitors electrical brain activity in the patientand collects data on eight electrodes (each with respect to a commonreference or in a “differential” manner) preferably at 250 Hz samplingrate. This collected data is transferred to the DSP chip (where thedetection algorithm resides) in blocks of 96 bytes, which is 8 channelsmultiplied by 12 data points per channel, and occurs at a fixed rate (48milliseconds). Time in the external system 100 can therefore be measuredin block counts. The external system 100 starts counting blocks from thestart of a session, and uses them for numerous purposes, such ascontrolling the stimulation board (found, for example, in thestimulation electronics module 203 of the bedside device 107).

[0146] Software methods within the external system 100 provide thefunctionality being described. In particular, software of the externalsystem 100 engages an authorize stimulation subroutine that checks fornumerous conditions to make sure they are all valid before authorizingstimulation. Software within the external system 100 also has a lockoutparameter that is checked by the authorize stimulation routine to makesure that enough blocks have passed to correspond to the startup timebefore it will allow stimulation. The default value that is used is37,500, which corresponds to 30 minutes. After this period, the lockoutis released and no longer prevents stimulation. Any seizure detectionsprior to this period that would otherwise result in stimulations maythereby be prevented. The time period during which the medical devicesystem only monitors and delivers no treatment therapy may beestablished by techniques other than block counts. For example, the timeperiod may be established such that a set quantity of information hasbeen obtained from the monitoring elements.

[0147] As discussed, the functionalities of the present invention may beimplemented in other embodiments. In the embodiment of a hybrid controlsystem, the aforementioned software methods may be implemented withineither the implantable device 953 or the external wearable device 1000(see FIG. 9). In the embodiment of a fully implanted control system, theaforementioned software methods may be implemented within the implanteddevice.

[0148] During its operation, the medical device system may also invokeany number of methods for limiting therapy during operation if it wouldresult in therapy being outside of the acceptable range for one or moretherapy parameters. For example, in the embodiment of the externalsystem 100, the system 100 may limit the total number of stimulationsdelivered for a variety of reasons including, but not limited to,programming checks and lockouts, tissue damage, and run time monitoringand control. During programming of the external system 100, theprogrammer software checks the programming information to make sure thatthe stimulation board (e.g., Synergy®) never provides a charge densityabove a predetermined limit (e.g., 30 μC/cm²/phase). In particular, theprogrammer software performs calculations based on the geometry of thelead being used and the attempted setting entered by the user. If thispredetermined limit is exceeded, a message informs or warns theuser/clinician and prevents the parameters from being sent to thestimulation board.

[0149] The programmer 109 may also limit the stimulation ON time that isallowed to be programmed into the external system 100 by calculatingparameters that will be used during run time to control the stimulationON time. Parameters include, for example and without limitation, amaximum number of stimulations per detection, a maximum number ofstimulations per cluster, a maximum stimulation ON time during aone-hour period, and a maximum stimulation ON time during a one-dayperiod. Depending on the embodiment, these parameters may be fixed inthe software or programmable so that they may be adjusted by thephysician or a qualified user.

[0150] Although the aforementioned functionality is described asexisting in programmer 109, in other embodiments such as a hybridcontrol system or a fully implanted system, the functionality may residein a physician or patient programmer (or in the implanted device or thehybrid system).

[0151] Again, it will be appreciated that other embodiments are possibleincluding medical device systems providing other treatment therapies aswell as systems that monitor other symptoms or conditions of a nervoussystem disorder. In the embodiment, the amplitude level may be adjustedbetween 0 and 20 volts; pulse widths may be adjusted between 20microseconds to 5 milliseconds, and the pulse frequency may be adjustedwithin 2 pps and 8,000 pps, in which the wave forms may be pulsed,symmetrical biphasic, or asymmetrical biphasic.

[0152] Timed Delay for Redelivery of Treatment Therapy

[0153] The medical device system may repeatedly administer treatmenttherapy during a detection, until the symptom or condition of thenervous system disorder has been terminated. For clarity, the followingdiscussion is provided in the context of the external system 100,although other embodiments are possible (e.g., the hybrid system). Inthe discussion, a neurological signal may be an EEG signal that issensed by one or more monitoring electrodes. However, in otherembodiments of the invention, a neurological signal may be providedusing other types of monitoring elements such as other types of sensors.Treatment therapies may include any number of possibilities alone or incombination including, for example, electrical stimulation, magneticstimulation, drug infusion, and/or brain temperature control. Theredelivery of stimulation is controlled by a programmable minimuminterstimulus interval (min ISI). The minimum interstimulus intervalbegins each time the medical device system terminates stimulation, andends after the specified amount of time. During the interstimulusinterval, the device is not able to turn on stimulation.

[0154]FIG. 23 shows a timing diagram including the seizure detectionalgorithm processed maximal ratio signal. As shown, EEG signal data 2300are processed by seizure detection algorithm 800. Signal data 2300 ischaracterized by a maximal ratio 2301 that is displayed as a function ofa time reference 2303 (which is relative to a detection cluster starttime in seconds). (Maximal ratio is discussed in the context of FIG. 22.The maximal ratio is the largest ratio of a set of ratios, in which eachratio is determined by a short-term value of a neurological signaldivided by the corresponding long-term value.)

[0155] Signal data 2300 comprises signal segments 2305, 2307, 2309,2311, and 2313. During segment 2305, signal data 2300 is collected,processed, and tracked by the medical device system (e.g., externalsystem 100) in order to determine if a seizure is occurring. As a resultof the seizure detection at the end of interval 2305, issued by theseizure detection algorithm's analysis of input signal data 2300 duringtime interval 2335, the medical device delivers an electricalstimulation pulse 2315 to a desired set of electrodes (e.g., electrodes101). Other embodiments of the invention, of course, may use other formsof therapeutic treatment discussed above.

[0156] During stimulation pulse 2315, a corresponding channel is blankedby hardware during a hardware blanking interval 2325 (approximately twoseconds in the example as shown in FIG. 23) so that no signal iscollected or analyzed during this interval of time. Additionally,meaningful data typically cannot be collected after stimulation pulse2315 for a period of time because associated amplifiers (e.g., amplifier1111) need to stabilize and because signal artifacts may occur betweenelectrodes during a amplifier recovery interval 2321 (approximatelythree seconds as shown in FIG. 23).

[0157] A software blanking interval 2329 (approximately five seconds asshown in FIG. 23) is equal to hardware interval 2325 plusamplifier/signal recovery interval 2321. During software blankinginterval 2329, the medical device system does not use signal data 2300during segment 2307 (corresponding to hardware blanking interval 2325)and segment 2309 (corresponding to amplifier recovery interval 2321). Inother embodiments, the medical device system may not collect signal data2300 during software blanking interval 2329. (In the embodiment,software blanking may occur on a subset of all channels, includingchannels not being stimulated. Also, the set of channels that aresoftware blanked may be different from the set of channels that arehardware blanked.)

[0158] In the embodiment, hardware blanking interval 2325 and softwareblanking interval 2329 may be predetermined, in which intervals 2325 and2329 may be programmable or non-programmable. Hardware blanking interval2325 may correspond to blanking of software or blanking of hardware, andsoftware blanking interval 2329 may correspond to blanking of hardwareor blanking of software.

[0159] After software blanking interval 2329 (the end of interval 2329coincides with the end of amplifier recovery interval 2321), the medicaldevice system resumes analyzing signal data 2300 using seizure detectionalgorithm 800 during recovery interval 2323 (and produces output ratiocorresponding to segment 2311 in FIG. 23). The recovery interval 2323allows time to ensure that subsequent analysis output is able tomeaningfully represent the post-treatment brain state. Since, in theembodiment, seizure detection algorithm 800 utilizes a two-secondforeground window, the algorithm recovery interval 2323 is approximatelytwo seconds. The medical device system may then use this meaningfullyrepresentative detection algorithm output in a subsequent interval 2333in order to determine whether treatment therapy was effective or if theseizure is continuing. This subsequent interval may be an instant intime (i.e., one data point), or may be extended to acquire sufficientmeaningful data to permit a statistical analysis of the efficacy of thetherapy. This information may be used to determine whether or not toredeliver treatment therapy.

[0160] In the embodiment, the medical device collects a minimum amountof meaningful data (corresponding to segment 2313) during a minimummeaningful data interval 2333. This enables statistical analysis of theefficacy of the therapy. The minimum interstimulus interval is equal toamplifier recovery interval 2321 plus detection algorithm recoveryinterval 2323 plus minimum meaningful data interval 2333. If the maximalratio 2301 remains at or above a predetermined threshold 2351, then themedical device system re-applies an electrical stimulation pulse 2317 tothe desired set of electrodes. If instead, the maximal ratio is belowthe predetermined threshold 2351, the medical device system continues tomonitor signal data 2300. An electrical stimulation or other form oftherapy may be applied if a subsequent seizure detection is made by themedical device system, indicating a continuation of the seizuredetection cluster.

[0161] In the embodiment, during the combined periods of algorithmrecovery interval 2323 and minimum meaningful data interval 2333(corresponding to a total time of approximately 2.5 seconds), thedetection algorithm's maximum ratio 2301 is monitored to determine ifthe subject is in a state of seizure or not. Two different scenarios arepossible, in which different rules are employed for each case to decidewhether restimulation should occur. If the algorithm's maximum ratio2301 exceeds the predetermined threshold 2351 for the entire period(i.e., interval 2323 plus interval 2333), stimulation will bere-administered. Onset of stimulation will occur at the end of theminimum interstimulus interval. In such a case, the algorithm's durationconstraint (time duration), which in the embodiment is approximatelyequal to 0.84 seconds, is not evaluated, since the subject is still in astate of seizure detection. However, if the algorithm's maximum ratio2301 drops below the predetermined threshold 2351 during this period,the seizure detection ends. Stimulation will not be administered untilthe next seizure detection within the detection cluster. This requiresthat the algorithm's threshold and duration constraints are bothsatisfied (i.e., maximum ratio 2301 is as great as the predeterminedthreshold 2351 for the duration constraint).

[0162] The process of restimulation will occur as long as the subjectremains in a state of seizure, and that pre-programmed stimulationsafety limits have not been reached.

[0163] The number of allowable stimulations per detection cluster is afunction of the stimulation duration and the stimulation limits. Forexample, in the embodiment, a stimulation duration of 2 seconds wouldresult in a maximum of 5 stimulations in a single seizure detection, anda maximum of 10 for the entire detection cluster. However, the clinicianmay program the number of allowable stimulations per detection clusterin order to adjust treatment therapy for the patient. If the subjectremains in a non-seizure state for a period of 1 minute, the clusterends. Determination of whether stimulation will be triggered for thenext detection cluster is determined by a programmed stimulationsequence.

[0164] Cycle Mode Providing Redundant Back-Up to Ensure Termination ofTreatment Therapy

[0165] The medical device system may provide a cycle mode of operationto serve as a redundant backup to ensure that therapy is stopped after apredetermined time period. In an embodiment, this functionality isprovided within an implanted therapy device such as an implantable pulsegenerator or a drug infusion device. In the embodiment of providingelectrical stimulation treatment therapy, for example, the cycle mode ofoperation may be provided in a stimulation board (e.g., the stimulationoutput circuit that is used in the Synergy® product sold by Medtronic,Inc.), which is typically within the implantable pulse generator. In thespecific embodiment of the external system 100, the stimulation boardmay reside in the stimulation electronics module 203 of the bedsidedevice 107. In general, the stimulation board of the medical devicesystem provides continuous stimulation where stimulation is turned onand remains on until it is explicitly turned OFF. A programmer or anexternal device, for example, may provide the necessary ON or OFFcommands to the stimulation board.

[0166] The stimulation board has a cycle mode, having a defined ON time,to act as a redundant back-up in case the stimulation board does notreceive the necessary command to turn OFF the stimulation therapy. TheON time may be predefined or may be programmable by a treating physicianor qualified user. More particularly, when the stimulation boardreceives an ON command, the stimulation board cycles ON and deliversstimulation. The stimulation board then eventually receives an OFFcommand to turn off the stimulation. If the medical device system,however, should happen to fail during stimulation and be unable tosupply the OFF command, the cycle mode acts as a redundant backup tomake sure that stimulation turns off after the ON timer has expired.

[0167]FIG. 24 is a flow chart illustrating a process for implementing acycle mode of operation within generally any medical device system. Theprocess may be implemented as logic circuitry or firmware in the medicaldevice system. At step 2405, the medical device system receives therapyparameters for the treatment therapy. For example, in the case of astimulation device, the treatment therapy parameters may includeelectrode identification, pulse width, pulse frequency, and pulseamplitude. The information may be received by the electronics componentresponsible for providing the electrical stimulation. In the externalsystem 100, it may be the stimulation electronics module 203. In thehybrid system 1000, it may be the implantable device 1100. At step 2410,the medical device system waits until it receives an ON command. Once anON command is received, at step 2415, the medical device system starts acycle timer ON and starts delivering the treatment therapy in accordancewith the previously-received treatment therapy parameters. Once again,the cycle ON timer may be predefined or may be programmable by atreating physician or qualified user. The medical device systemcontinues to deliver treatment therapy and checks whether it received anOFF command, at step 2420, and whether the cycle ON timer has expired,at step 2425. Again, the cycle ON timer may be pre-configured to anyduration or may be programmed by the treating physician. Under normaloperation, once an OFF command is received, at step 2435, the medicaldevice system turns off the treatment therapy and turns off the cycle ONtimer. The system then returns to step 2410 to start the process overonce another ON command is received.

[0168] If, on the other hand, the system does not receive the OFFcommand, but the cycle ON timer has expired, at step 2430, the systemturns off the treatment therapy and activates a cycle OFF timer. Duringthe cycle OFF time, the system is unable to provide treatment therapy.This provides an indication to the patient or the physician that theredundant cycle mode was activated due to failure in receiving an OFFcommand. The cycle OFF timer is typically pre-configured to apredetermined maximum time duration to give the physician time to noticethat the medical device system is not functioning as expected. (As anexample, an embodiment sets the cycle OFF timer to approximately 32hours.)

[0169] The system next waits until either the cycle OFF timer hasexpired, at step 2445, or until the system has received an OFF command,at step 2440. The “YES” branch from step 2445 to step 2415 is nottypically executed because the cycle OFF time should give the physiciantime to notice system failure and to intervene accordingly.

[0170] Phase Shifting of Neurological Signals

[0171] In the present invention, multiple neurological signals may beprocessed for information about a symptom or a condition of a nervoussystem disorder. Successful detection of a disorder is dependent on thetemporal integrity of the signals relative to one another. Consequently,once the neurological signals are sampled, they may become virtuallyshifted in time by interpolating between adjacent samples. Temporalalignment can be approximated using an interpolation phase shiftalgorithm, thereby correcting any error caused by the time shiftedneurological signals. This technique may be implemented within aclosed-loop medical device system or a medical device system having onlymonitoring.

[0172] Given N channels of data that are sampled at different points intime, interpolation techniques may be utilized to obtain estimates oftrue time-locked signal values on all channels at a sequence of timepoints. Essentially, the interpolation techniques reconstruct anestimate of what the data would have been if all channels had beensimultaneously sampled, even though they were not.

[0173] In order to accomplish this, an interpolating model is selectedfor use in determining signal estimates at time points between those forwhich digitization was actually performed. The particular interpolatingfunction, in general, may depend on data values received up to themoment in time it is evaluated. One channel is selected, typicallychannel #1, whose sampling times are used as a temporal reference.Estimates of the values on all other channels may then be computedrelative to the temporal reference. Knowing the elapsed time betweendigitization of the reference channel and that of any other channel, achannel-dependent time-shift, Δt_(j), may be obtained that representsthe time difference between the sampling times on channel j and thecorresponding reference times at which the estimates are desired.

[0174] In the preferred embodiment, the interpolating model is a thirddegree polynomial that is fit (i.e., defined by) the most recent fourdata points on each signal channel. One skilled in the art willappreciate that other interpolating models, e.g., lower or higher degreepolynomials, may also be used, depending on such things as spectralproperties of the raw signal being interpolated and computationalcomplexity or power requirements of the device processor.

[0175] In the preferred embodiment, the phase-corrected corrected signalhas been implemented in the computationally efficient form of achannel-dependent finite impulse response digital filter applied to theraw data obtained for each channel. More specifically, if the sequenceof raw data on channel j is denoted by X₁ ^(j),X₂ ^(j),X₃ ^(j), . . .,X_(k−2) ^(j),X_(k−1) ^(j),X_(k) ^(j), then the interpolated output,Y_(k) ^(j), at time sequence point k and on channel j is obtained viathe formula:$Y_{k}^{j} = {\sum\limits_{i = 0}^{3}{b_{i}X_{k - i}^{j}}}$ where${b_{0} = {\frac{C_{j}^{3}}{6} - \frac{C_{j}^{2}}{2} + \frac{C_{j}}{3}}},{b_{1} = {{- \frac{C_{j}^{3}}{2}} + {2C_{j}^{2}} - \frac{3C_{j}}{2}}},{b_{2} = {\frac{C_{j}^{3}}{2} - \frac{5C_{j}^{2}}{2} + {3C_{j}}}},{b_{3} = {{- \frac{C_{j}^{3}}{6}} + C_{j}^{2} - \frac{11C_{j}}{6} + 1}},{{{and}\quad C_{j}} = {\frac{25 - j}{8}.}}$

[0176]FIG. 25 shows a flow diagram 2500 for phase shifting in accordancewith another exemplary embodiment based on a polynomial interpolationmodel (e.g., parabolic, linear, cubic, etc.). Step 2501 initiates phaseshifting for one the received neurological signals or channels relativeto a first neurological signal, which is treated as a reference signal.In step 2502, signal samples for the received neurological signal arecollected corresponding to the current sample time and the two previoussample times. In steps 2503 and 2504, unknown variables for theinterpolation equation are calculated. In step 2505, a delta time shiftis computed for the current channel. In step 2506, the shifted sampleoutput is computed by solving the polynomial curve fit equation at thedelta time shift. The received neurological signal may thereby becorrected by shifting the signal samples in time by an amount determinedin step 2506 so the neurological signal is synchronized with the defaultneurological signal. This process may then be repeated for each receivedneurological signal. The time-shifted neurological signals and thedefault signal may thereby be utilized to provide closed-loop feedbackcontrol of the treatment therapy.

[0177]FIG. 26 illustrates an example of applying a parabolicinterpolation phase shift algorithm. In this example, a simple sine wavesignal from channel 1 is sampled, indicated by 2601, and treated as areference signal. A second channel is sequentially sampled andexperiences a shift in time, as indicated by 2602. Signal 2603 shows thesecond signal corrected for the time shift after the phase shiftalgorithm is applied. In one embodiment, sequential samples from a givenchannel is used to generate a parabolic curve to “interpolate” what theactual value would have been had they sampled it at the correct time(all channels sampled in parallel). The accuracy may be improved byusing other interpolation function models, including higher orderpolynomials. In another embodiment, data samples themselves may beshifted.

[0178] Those skilled in the art will appreciate that other phaseshifting algorithms may be utilized including, in particular, otherformulas for determining the amount of time shifting. Moreover, althoughdescribed in the context where nervous system disorder being treated isa seizure, the principles of the invention may be applied towardtreatment of other nervous system disorders, and may be utilized toprocess any number of neurological signals.

[0179] Channel-Selective Blanking

[0180] In accordance with another feature of the present invention, anyone of the above-described medical device systems may be configured sothat it may provide hardware and software blanking functionality. Inparticular, the medical device system may invoke either hardwareblanking and/or software blanking of a received neurological signal ifthe system should not process the signal for the correspondingmonitoring element. In the embodiment of the external system 100, forexample, hardware blanking (through blanking circuitry 401) correspondsto the system disconnecting the EEG amplifier 103 from the channel thatis being stimulated by stimulation electronics 203 through theassociated electrode during a time interval that includes thestimulation delivery period. (In the embodiment, amplifier 103 isdisconnected from the associated electrode and connected to a referencevoltage.) Because no data is being collected during stimulation, no data(for the corresponding channel) is sent to the processor 207 to beprocessed by the detection algorithm 800 at the associated time. Datamay, however, be collected on other channels that are not beingstimulated and processed at an associated time.

[0181] In addition, the medical device system may invoke softwareblanking in which data from a neurological signal is collected for aparticular channel, but the medical device system determines that datashould not be processed during a time interval (e.g., for use with thedetection algorithm discussed above). For example, if hardware blankingis invoked for certain channels, the medical device system may invokesoftware blanking on those and/or on any electrode (i.e., on differentchannels) where a stimulation artifact may occur. (For example,stimulating an electrode may cause adjacent electrodes to incurstimulation artifacts.) As another example, software blanking may beinvoked if the EEG amplifier 103 is recovering after the termination ofstimulation on at least one channel.

[0182]FIG. 27 shows a flow diagram (process) 2700 for closed looptherapy including hardware and software blanking in accordance with anembodiment of the invention where the nervous system disorder beingtreated is a seizure and the treatment therapy is electricalstimulation. Step 2701 initiates signal processing by the seizuredetection algorithm 800. In step 2703, the seizure detection algorithm800 determines whether or not a seizure has been detected. In theembodiment, an output ratio (e.g., the maximum ratio 2203 that isassociated with the waveforms 2253, 2255, 2257, or 2259 as shown in FIG.22) exceeds a predetermined threshold (e.g., the threshold 2211) forlonger than a given time duration. In the embodiment, the correspondingsignal(s) may be obtained from an electrode or from a group ofelectrodes (selected from the electrodes 101). In step 2705, a beginningof a detection cluster is recognized in accordance with the seizuredetection algorithm 800. Detection of a seizure will trigger delivery ofa treatment therapy (in this case stimulation), which may be redeliveredduring a detection cluster (e.g., cluster duration 2205) until theseizure has been terminated or safety limits (such as maximumstimulation on time per given period of time) have been reached ortolerability becomes an issue. In accordance with the determinedtreatment, step 2709 is executed, in which stimulation to a selectedelectrode or group of electrodes is applied, hardware and softwareblanking are invoked, and a stimulation timer is initiated. (In otherembodiments, the medical device system may utilize drug infusion or acombination of electrical stimulation and drug infusion to delivertreatment therapy.) When the stimulation timer has expired, asdetermined in step 2711, the stimulation pulse terminates, hardwareblanking ceases, and an interstimulus interval (ISI) timer and asoftware blanking timer are started in step 2713. Processing of thesignals is not resumed and the seizure detection algorithm's output(i.e., the output ratio and/or detection state) is held constant(throughout the hardware and software blanking periods,) until thesoftware blanking timer has expired as determined in step 2715.

[0183] While the detection algorithm is being software blanked, norecorded data is provided to the algorithm (from the channels which areblanked) in order to avoid the simultaneously occurringhardware-blanking/reconnection artifacts and/or stimulation artifactsfrom adversely affecting the detection process. During these timeintervals, the corresponding individual channel ratios that werecomputed at the instant the software blanking began are held constantthroughout the period of software blanking. This is done to avoid, forexample, terminating an active detection by setting the ratios to somelesser value. Ratios are allowed to fluctuate as data is analyzed onother non-software-blanked channels.

[0184] Referring to FIG. 27, when the software blanking timer hasexpired in step 2715, the algorithm resumes processing correspondingsignals in step 2717. If the output ratio remains above thepredetermined threshold 2211, indicating that detected activity iscontinuing as determined in step 2719, the ISI timer is reset and step2721 determines if the ISI timer has expired. (The ISI timer sets aminimum ISI time between adjacent stimulation pulse trains.). If the ISItimer has expired, another stimulation pulse may be applied to theselected electrode or group of electrodes (as executed by step 2709) inaccordance with the determined treatment therapy. (Moreover, thedetermined treatment therapy may apply subsequent stimulation pulsesthat are separated by a time greater than the minimum ISI time.) If theISI timer has not expired, step 2719 is repeated. In step 2719, if theseizure detection algorithm 800 determines that the output ratio dropsbelow the predetermined threshold 2211, a cluster timer (correspondingto the time threshold 2215 in FIG. 22) is initiated in step 2723. Thecluster timer is also reset in step 2723

[0185] If the cluster timer (e.g., corresponding to time threshold 2215)has expired, as determined by step 2725 after reaching step 2723, theend of the detection cluster is recognized in step 2729 and data that iscollected during the cluster duration, as well as some prior period ofdata that may be of interest, may be stored in a loop recording (e.g.,SRAM and flash memory 605) in step 2731. (The expiration of the clustertimer is indicative of a maximum time duration that the output thresholdcan be below a predetermined threshold, e.g., predetermined threshold2211, while the detection cluster is occurring. In other words, if theoutput threshold is below the predetermined threshold and the clustertimer expires, process 2700 determines that the detection cluster hasended.) Step 2701 is then repeated. A subsequent detection cluster mayoccur during the seizure, causing steps 2705-2731 to be repeated.

[0186] If the cluster timer has not expired, as determined by step 2725,seizure detection is performed in step 2727, as was performed in step2703. Step 2727 determines if the detection cluster associated with theseizure, as detected in step 2703, continues due to a new seizuredetection that occurs before the cluster timer expires. If so, the ISItimer is reset and step 2728 determines if the ISI timer has expired. Ifso (i.e., the detection cluster continues and the time between adjacentstimulation pulses is greater than the ISI minimum time), then step 2707is repeated. If the ISI timer has not expired, then step 2727 isrepeated. If step 2727 determines that a seizure is not detected, step2725 is repeated.

[0187] Steps 2701-2731, as shown in FIG. 27, may be sequentiallyexecuted. However, in a variation of the embodiment some of the stepsmay be executed in parallel while other steps may be sequentiallyexecuted. For example, step 2701 (start/continue signal processing) maybe executed in parallel with step 2731 (data storage).

[0188] Hardware and/or software blanking may be automatically appliedbased upon the results of applying signal quality control algorithms,such as those described above, to test the reliability of sensorsignals. Application of signal quality control may at anytime result incontinuous hardware or software blanking of a particular sensor due toartifact. However, signal quality control algorithms may also be appliedto any of the sensor channels to determine if the applied therapy (e.g.,stimulation) is causing artifacts that require hardware or softwareblanking during and after application of the therapy. Those sensorchannels determined not to be affected by the application of thetreatment therapy do not need to be blanked, thus enhancing the abilityof the system to monitor the patient. In addition, periodic checking ofa sensor channel following a treatment pulse and applying signal qualityalgorithms can automatically determine the length of time needed forhardware and/or software blanking for that channel during futureapplications of the therapy. For example, a signal that is associatedwith an electrode in proximity of a stimulated electrode may be analyzedto have artifact characteristics, including during a time interval inwhich an artifact affects the signal. Alternatively, parameters of thetherapy treatment may be adjusted within a range of values known to betherapeutic in an effort to reduce the effect on the signal quality ofadjacent sensors. In this manner the medical device system can enhanceit's ability to collect data while providing treatment therapy.

[0189] Even though hardware blanking is generated during the timeinterval in which an electrode is being stimulated, hardware blankingmay be generated for other time intervals in which the associatedamplifier may experience saturation (clipping or overload). The need forsoftware blanking may be determined from geometric and electricalconfigurations of the electrodes, e.g., distance between electrodes andthe stimulation intensity that may be measured by stimulation voltage).For example, the inducement of artifacts on a channel may be inverselyrelated to the corresponding electrode and the stimulated electrode.

[0190] In an embodiment, software blanking may be determined by acalibration process in which an electrode is stimulated and thecorresponding artifacts are measured for adjacent electrodes. Forexample, an artifact may be determined by stimulating a first electrodeand measuring the artifact on a channel of a second electrode. Theartifact may be determined by measuring a signal perturbation on thechannel with respect to the signal on the channel without stimulatingthe first electrode. The procedure may be repeated by individuallystimulating other electrodes. Alternatively, an impedance of the secondelectrode may be measured while stimulating the first electrode todetermine an effect on the measured impedance.

[0191] Multi-Modal and Long-Term Ambulatory

[0192] The medical device system may support multi-modal operation, inwhich operation is modified in accordance with the configuration of themedical device system. One skilled in the art will recognize that theimplanted system 10 (as shown in FIG. 12) may be more limited infunctionality and features when compared to hybrid system (e.g., asshown in FIG. 9) due to the need to conserve the limited amount ofenergy available in a totally implanted system. One approach toexpanding the capabilities is to incorporate a rechargeable battery inthe implanted system 10. An alternative approach is to partition some ofthe features, particularly those that consume the most energy and arenot used all the time, to the external portion 950 of a hybrid system oranother external component of a hybrid system that may be associatedwith a process step, e.g., step 2025 of process 2000 as described inFIG. 20. (As previously discussed, FIG. 10 shows an exemplary embodimentof the external portion 950 with the associated programmer 1021.) In oneembodiment, the medical device system operates as a closed-loopstimulator, in which stimulation therapy is adjusted in accordance withsignal measurements and analysis that is performed. The electronics andsoftware required to operate the closed loop control reside in theexternal portion 950 of a hybrid system or the external wearable signalprocessor 1425 in a hybrid system with a telemetry booster stage orrelaying module. However, if the closed-loop control is removed from theconfiguration, corresponding to a removal of the external portion 950,the medical device system may operate as an open loop stimulator, inwhich electrodes with associated implanted electronics generatestimulation therapy. An external component may be removed for differentreasons. For example, the external portion 950 may be removed at timeswhen monitoring or when therapy features executed by the externalportion are not required, such as at night, for patients who do notrequire closed-loop control while sleeping. Also, an external componentmay be configured in a medical device system in order to invoke optionalfunctionality or enhanced functionality, in which the external componentinteracts with an implanted component.

[0193] An alternative embodiment incorporates both closed loop controland open-loop control of therapy in the implanted portion 950 with addedfeatures being supported by an external component, e.g., externalportion 950 or external wearable signal processor 1425. In theembodiment, the external portion 953 operates in conjunction with theimplanted portion 953 to provide an added function. For example, theexternal portion 950 may receive neurological data from the implantedportion 953 through a communications channel (e.g., a hardwire or atelemetry link) and support an added feature in accordance with theneurological data. The added feature may enhance functionality that isprovided by an implanted component and may provide additionalfunctionality to the medical device system. Examples of correspondingadded features may include loop recording of segments of signalsobtained from sensors such as EEG, emergency care features such assounding an alarm or providing a cue to warn the patient of an impendingmedical condition, and making a cell phone telephone call to a caregiver or health care professional if the medical condition of thepatient changes. Additional information may be included with theneurological data and may be indicative of the patient's location, wherethe location may be determined by a Global Positioning System (GPS)receiver that interfaces with the medical device system. Activation of aloop recording function may be established by the physician or by acaregiver or patient with physician guidance using a programmer, e.g.,the programmer 1021. Loop recording causes a segment of one or moremonitored signals occurring around an automatically detected event orselected by the user to be stored in a memory. Programming of implantedportion 953 includes communicating over a communications channel usingprogrammer 1021. The messages sent from programmer 1021 to implantedportion 953 include instructions, parameters, and/or firmware algorithmsthat establish conditions under which the loop recording is activated.Exemplary conditions that may initiate loop recording includingrecognition of specific characteristics of monitored signals such as theoccurrence of a neurological event, established by the physician ingeneral or specifically for the individual and programmed into thememory of the implanted portion 953. Conditions may also include manualtriggers activated by the patient or caregiver or specific times of theday when loop recording should occur. Conditions for loop recording mayalso include certain types of errors or aberrant monitored signals suchas those recognized by signal quality control algorithms that may bestored for later analysis. Manual triggers activated by the patient orcaregiver may include, but are not limited to, subjective or visiblemanifestations of an event, or the point in time when a treatmenttherapy is delivered triggering storage of the signals after anappropriate time delay or when meals or beverages are consumed that mayaffect the physiological parameter being sensed by sensors inimplantable device 953.

[0194] An alternative embodiment incorporates the same functionality inboth implanted portion 953 and external portion 950 but where theexternal portion 950 enhances the functionality with added capacity toexecute a specific mode of operation. For example, memory capacity ofimplanted portion 953 may limit the amount of time and/or number ofmonitored signals stored during loop recording. Periodic use of externalportion 950 to download the contents of the memory of the implantedportion 953 to the external portion 950 for storage until the downloadeddata can be transferred to physician programmer 1021 may expand thesystem capabilities. In another embodiment, external portion 950 mayinclude a connection (e.g., with a modem) to the Internet allowing dataabout the performance of the system that is obtained during looprecording to be transmitted to the physician. Alternatively, programminginstructions may be sent by the physician to the external and/orimplanted portions.

[0195] Moreover, an external component, e.g., the external portion 950,may send data to an implanted component, e.g., the implanted portion953. Programming of implanted device 953 may be accomplished usingprogrammer 1021 communicating directly with implanted portion 953. Thismethod is acceptable when all the communication protocols andoperational features required for communication between implantedportion 953 and external portion 950 are fixed. In those instances whenmodes of operation must be coordinated between implanted portion 953 andexternal portion 950, it may be more efficient to program the implantedportion 953 by first programming external portion 950, which in turnsends data corresponding to appropriate instructions and receivesconfirmation of receipt from implanted portion 953 via antenna 955.Those skilled in the art will recognize that the reverse operation ofprogramming implanted portion 953 that in turn communicates withexternal portion 950 is possible. However, this mode of operationrequires two telemetry operations while programming of external device950 directly can be accomplished using a hard wire connection.

[0196] In one embodiment of multi-modal operation, the operation byimplanted portion 953 of features requiring an external portion 950 maybe dependent upon an on-going communication between implanted portion953 and external portion 950. In one instance, implanted device 953periodically sends a signal to external device 950 confirming its modeof operation by providing an indication of the presence of the externalportion 950. (If the implanted portion 953 does not receive a signalfrom the external portion 950 within a specified period of time, theimplanted portion 953 may assume that the external portion 950 is notconnected to the implanted portion 953.) Implanted portion 953 continuesto support features requiring the external portion 950 until such timethat implanted portion 953 detects that external portion 950 is nolonger available. At this point, implantable portion 953 transitions toanother mode of operation that does not require the external portion950. In such a case, the implantable device 953 supports features thatcan be supported without interaction to the external device 950. Forexample, the implantable portion 953 may continue delivering treatmenttherapy in the open-loop mode (i.e., without feedback using neurologicaldata), even though the implantable portion 953 delivers treatmenttherapy in the closed-loop mode (i.e., with feedback using neurologicaldata) when operating in conjunction with the external portion 950.

[0197] Multi-Modal operation may also include simultaneous operation ofseveral modes of operation of a medical device system, where a pluralityof features may be supported during the same treatment interval.Simultaneous operation may occur with different medical device systemarchitectures such as external system 100, the hybrid system as shown inFIGS. 9 and 10, or a hybrid system with telemetry booster 1415 (as shownin FIG. 14). In this embodiment, a first feature may support treatmenttherapy in an open loop fashion such as a prophylactic treatment toprevent a medical condition. Simultaneously, a second feature maysupport an algorithm that monitors sensors for prescribed conditionsthat trigger delivery of incremental therapy. In one embodiment, thedevice in FIG. 13 may employ an infusion system to provide apharmaceutical agent in a continuous or intermittent manner to reducethe likelihood of a neurological condition from occurring. However,under prescribed conditions, the medical device system may also providestimulation to respond to an instantaneous change in the medicalcondition in a closed-loop fashion. The incremental therapy may occur inresponse to changes in the values of sensors or a trigger input by thepatient. The triggers or sensor changes may also start loop-recording ofsignals or values of parameters (corresponding to a third feature)and/or communicate with health care professionals via telephone/cellphone links (corresponding to a fourth feature). For example, there maybe communications to the patient with instructions to take oralmedication.

[0198] The medical device system may support multi-modal operation, inwhich operation is modified in accordance with the configuration of themedical device system. In one embodiment, the medical device systemoperates as a closed-loop stimulator, in which stimulation therapy isadjusted in accordance with signal measurements and analysis that isperformed. However, if the closed-loop control is removed from theconfiguration, the medical device system operates as an open loopstimulator, in which electrodes with associated implanted electronicsgenerate stimulation therapy.

[0199] Scoring of Sensed Neurological Signals

[0200] The system may further contain software modules or programs forscoring the severity of sensed neurological signals relating to anervous system disorder. In particular, the system may monitor sensedneurological signals and compute a relative severity of the eventsassociated with the neurological signal. Thus, each seizure detectionmay be ranked based on the relative severity score. This process may beperformed for each neurological signal that is sensed by the system.Moreover this process may be performed in an implanted device or anexternal device. If performed in the implanted device, the rankedinformation may telemetered to the external device for furtherprocessing and/or display.

[0201] A seizure event may include, for example, a detected specifiedevent and a reported event. Examples of a detected specified eventinclude, without limitation, an occurrence of a maximal intensity, anextent of electrographic spread, or a number of detection clusters perunit time exceeding a corresponding predetermined threshold. A detectedspecified event may be associated with a detection cluster, in which thetime duration of the detection cluster or the number of detectionswithin a detection cluster may be further specified. A reported event isa seizure event that the patient perceives and reports, for example, bya button press.

[0202] The system may be programmed to analyze one or more particularfeatures of the sensed neurological signal and automatically assign toeach seizure event a “relative severity score” (RS) that is based on theparticular feature(s) being considered. Examples of features to beranked include, without limitation, a maximum ratio (i.e., peakinstantaneous intensity level or ratio of foreground seizure activityvs. background activity), duration of the seizure detection, spread(number of monitoring elements involved in the event as previouslydiscussed in the context of FIG. 22), number of clusters per unit time,number of detections within a cluster, duration of an event cluster,mean or median duration of a detections, and an inter-seizure interval.

[0203] By having a relative severity score for each seizure event, theexternal system 200 may thereby rank events by severity relative toother events and provide a means of visually displaying (i.e., looprecordings) and listing (summary records) the information. To determineseverity, a formula using algorithm-based measures of seizure activitymay be used by relating the duration, intensity, and extent ofelectrographic spread of a seizure. The external system 200 allows theuser to determine which events are to be included/excluded from relativeseverity score computations. This feature may be programmable. Theexternal system 200 has a means of manually and/or automaticallycomputing the subject's Relative Severity Minimum (RS Min), in which thelowest relative severity score associated with clinical manifestationsor other behaviors indicative of seizure activity is used to minimizethe probability of missing clinical seizures. Seizures with scores closeto or above the RS Min not associated with event markings or recorded ina clinician's notes may then be visually reviewed to determine if theyhave clinical manifestations.

[0204] In an embodiment, the system is capable of computing the relativeseverity of detected specified events within a comparable parameterconfiguration. Each detected specified event has four associatedfeatures to be measured: (1) max ratio; (2) duration; (3) spread; and(4) investigator classification. These features can be denoted by thevector X=(R, D, I; C), where R=max ratio, D=duration, I=Number ofinvolved channels, and C=investigator classification (i.e., TPC, TPNC,FP, or NR). “TP” denotes either TPC or TPNC, and denotes “True Positive”detection. TPC denotes a “True Positive Clinical” detection withclinical manifestations, and TPNC denotes a “True Positive Non-Clinical”detection absent clinical manifestations. FP denotes a “False Positive”and NR denotes a detection that has thus far been “Not Reviewed.” Thefollowing describes a specification for the relative severity functionthat uses all such detection clusters (obtained from analysis sessionsthat have comparable parameter configurations) as inputs and produces asan output a severity score for each such detection cluster.

[0205] In some embodiments, it may be difficult to detect clinicalmanifestations. For example, a seizure may be clinically apparent onlyif a patient is performing some action when the seizure occurs. In otherembodiments of the invention, additional investigator classificationsmay be defined. For example, an investigator classification“Non-classifiable” or “Difficult to Classify” may be used if theinvestigator cannot determine is not able to classify the event. Also,an investigator classification “Epileptiform Discharges” may be definedto help identify the impact that treating epileptiform discharges mayhave on seizure frequency.

[0206] The relative severity scores are computed using an “interpolatingempirical probability function” (defined below) derived from alldetection clusters in the comparable parameter set that have beenpreviously scored by the investigator as TRUE POSITIVES. (However,scoring is not limited to TRUE POSITIVES an may encompass otherinvestigator classifications.) The function also utilizes the possibleranges of R, D, and I in the calculation (e.g., in the a priori casewhen there are no TPs marked yet because no review has been performed).For example, suppose these ranges are:

R_(min)=D_(min)=I_(min)=0,

R_(max)=6550, D_(max)=65536 (frames), I_(max)=8.

[0207] Suppose that there are N prior true positive detection clustersfrom among M total detection clusters (0≦N≦M). It is assumed that alldetection clusters are associated with the same comparable detectionparameter configuration. The relative severity computations areperformed separately and independently on each different parameterconfiguration's set of detection clusters. The relative severity scoreof a particular detection cluster Y=(R, D, I; C) may be determined bythe following formula:

RS(Y)=Round(100*(p ₁ +p ₂ +p ₃)/3)

where

p ₁ =P(R; R _(min) , R _(max) , {R _(j)|cluster j is a TP}),

p ₂ =P(D; D _(min) , D _(max) , {D _(j)|cluster j is a TP}), and

p ₃ =P(I; I _(min) , I _(max) , {I _(j)|cluster j is a TP}).

[0208] where P is the interpolating empirical probability function(IEPF) described below.

[0209] The interpolating empirical probability function can now bedescribed. Given some empirical data values z₁, z₂, . . . , z_(N) whichare sorted in increasing order and which lie in a range [z_(min),z_(max)] (with z_(min)<z_(max)), define the interpolating empiricalprobability function, P(x; z_(min), z_(max), {z₁, . . . , z_(N)}), asfollows. In the first case where N>0:${P\left( {{x;z_{\min}},z_{\max},\left\{ {z_{1},\ldots \quad,z_{N}} \right\}} \right)} = \left\{ \begin{matrix}0 & {{{if}\quad x} < z_{\min}} \\{\frac{1}{N + 1}\left( \frac{x - z_{\min}}{z_{1} - z_{\min}} \right)} & {{{if}\quad z_{\min}} \leq x < z_{1}} \\{\frac{1}{N + 1}\left( {i + \frac{x - z_{i}}{z_{i + 1} - z_{i}}} \right)} & {{{if}\quad z_{i}} < x < {z_{i + 1}\quad {for}\quad {some}\quad i}} \\{\frac{1}{2\left( {N + 1} \right)}\left( {1 + {\sum\limits_{j = 1}^{N}\left( {1_{\{{z_{j} \leq x}\}} + 1_{\{{z_{j} < x}\}}} \right)}} \right)} & {{{if}\quad x} = {z_{i}\quad {for}\quad {some}\quad i}} \\{\frac{1}{N + 1}\left( {N + \frac{x - z_{N}}{z_{\max} - z_{N}}} \right)} & {{{if}\quad z_{N}} < x \leq z_{\max}} \\1 & {{{if}\quad z_{\max}} < x}\end{matrix} \right.$

[0210] Here, 1_({.}) denotes the indicator function of the set {.}. Inthe second case where N=0:${P\left( {{x;z_{\min}},z_{\max},{\{\}}} \right)} = \frac{{\min \left\{ {{\max \left\{ {x,z_{\min}} \right\}},z_{\max}} \right\}} - z_{\min}}{z_{\max} - z_{\min}}$

[0211] FIGS. 28-33 depict various examples. As an example, suppose thereare 4 scored True Positive detection clusters as follows: R_(max) D (s)I C 103.1 35.2 6 TPC 115.6 41.3 4 TPNC 34.7 18.9 6 TPNC 189.9 55.1 8 TPC

[0212] Next suppose 4 more detection clusters are obtained which arepresently not reviewed as follows: R_(max) D (s) I C 200.3 12.6 5 NR49.5 83.2 6 NR 2653.2 4.2 1 NR 122.4 6.9 3 NR

[0213] The following table illustrates the results of determining the RSscore for each detection. R_(max) p₁ D p₂ I p₃ RS TP 103.1 0.4 35.2 0.46 0.5 43 115.6 0.6 41.3 0.6 4 0.2 47 34.7 0.2 18.9 0.2 6 0.5 30 189.90.8 55.1 0.8 8 0.8 80 NR 200.3 0.80032704 12.6 0.133333 5 0.3 41 49.50.24327485 83.2 0.801818 6 0.5 52 2653.2 0.87746105 4.2 0.0444444 1 0.0532 122.4 0.61830417 6.9 0.0730159 3 0.15 28

[0214] Note that the interpolating empirical probability functions usedto determine the p_(i) values are determined using only the TP values,then evaluated for both the TP and NR detection clusters to determinethe severity.

[0215] If, instead, all of the detection clusters had not yet beenscored (or at least not scored as TPs), the severity computations wouldbe changed as shown in the following table. R_(max) p₁ D p₂ I p₃ RS NR103.1 0.0157 35.2 0.0112 6 0.7500 26 115.6 0.0176 41.3 0.0131 4 0.500018 34.7 0.0053 18.9 0.0060 6 0.7500 25 189.9 0.0290 55.1 0.0175 8 1.000035 200.3 0.0306 12.6 0.0040 5 0.6250 22 49.5 0.0076 83.2 0.0264 6 0.750026 2653.2 0.4051 4.2 0.0013 1 0.1250 18 122.4 0.0187 6.9 0.0022 3 0.375013

[0216] On the other hand, if all had been scored as TPs, then the RSscores would be evaluated as shown in the following table. R_(max) p₁ Dp₂ I p₃ RS TP 103.1 0.3333 35.2 0.5556 6 0.6667 52 115.6 0.4444 41.30.6667 4 0.3333 48 34.7 0.1111 18.9 0.4444 6 0.6667 41 189.9 0.6667 55.10.7778 8 0.8889 78 200.3 0.7778 12.6 0.3333 5 0.4444 52 49.5 0.2222 83.20.8889 6 0.6667 59 2653.2 0.8889 4.2 0.1111 1 0.1111 37 122.4 0.5556 6.90.2222 3 0.2222 33

[0217] The above examples illustrate the determination of the relativeseverity score with a data corresponding to a mixture of true positivedetection clusters and not reviewed detection clusters, with datacorresponding only to true positive detection clusters, and to datacorresponding only to not reviewed detection clusters.

[0218] In an embodiment, the medical device system may be modularlyexpandable in order to add a feature that may enhance existingfunctionality or that may support additional functionality. An externalcomponent, e.g., external portion 950, may include a module thatsupports the added feature. The module may be implemented with dedicatedhardware and/or computer-executable instructions that are performed byan associated processor. In another embodiment, the module may beassociated with another external component that couples to the externalcomponent. As can be appreciated by one skilled in the art, a computersystem with an associated computer-readable medium containinginstructions for controlling the computer system can be utilized toimplement the exemplary embodiments that are disclosed herein. Thecomputer system may include at least one computer such as amicroprocessor, digital signal processor, and associated peripheralelectronic circuitry.

[0219] Thus, embodiments of the CONFIGURING AND TESTING TREATMENTTHERAPY PARAMETERS FOR A MEDICAL DEVICE SYSTEM are disclosed. Oneskilled in the art will appreciate that the present invention can bepracticed with embodiments other than those disclosed. The disclosedembodiments are presented for purposes of illustration and notlimitation, and the present invention is limited only by the claims thatfollow.

What is claimed is:
 1. A method for configuring and testing therapyparameters for a treatment of a nervous system disorder with a medicaldevice system, the medical device system being in a manual treatmenttherapy mode, the method comprising: (a) receiving a first set ofinformation from a user, the first set of information being associatedwith a first treatment therapy configuration; (b) assessing whether thefirst set of information is within a range of safety; (c) applying afirst treatment therapy to a patient in accordance with the first set ofinformation; (d) if the first treatment therapy is not safe, executing acorrective action; and (e) if the first treatment therapy is safe,storing the first set of information for subsequent use.
 2. The methodof claim 1, wherein (d) comprises: preventing re-delivery of the firsttreatment therapy.
 3. The method of claim 1, wherein (d) comprises:terminating the first treatment therapy.
 4. The method of claim 1,further comprising: (f) receiving an indication from the user whetherthe first treatment therapy is tolerable to the patient; and (g) if thefirst treatment therapy is not tolerable, executing a correspondingaction.
 5. The method of claim 1, further comprising: (f) applying asubsequent treatment therapy in accordance with the first set ofinformation.
 6. The method of claim 1, further comprising: (f)associating a first label with the first set of information.
 7. Themethod of claim 6, further comprising: (g) receiving the first labelfrom the user; and (h) applying a subsequent treatment therapy inaccordance with the first label.
 8. The method of claim 6, furthercomprising: (g) receiving another set of information from the user, theother set of information being associated with another treatment therapyconfiguration; (h) associating another label with the other set ofinformation; and (i) comparing the first set of information and theother set of information.
 9. The method of claim 8, further comprising:(j) if the other treatment therapy configuration is essentially unique,storing the other set of information and the other label.
 10. The methodof claim 8, further comprising: (j) if the other treatment therapyconfiguration is not essentially unique, outputting a notification tothe user.
 11. The method of claim 8, further comprising the step of: (j)if the other treatment therapy configuration is not essentially unique,rejecting the second set of information.
 12. The method of claim 1,wherein the first treatment therapy configuration comprises at least oneattribute selected from the group consisting of an electrodeconfiguration, a stimulation parameter, a test treatment therapy level,an indication about safety to the patient, and a level of tolerabilityby the patient.
 13. The method of claim 12, wherein the stimulationparameter is selected from the group selected from a voltage level of astimulation pulse, a pulse width of the stimulation pulse, a duration ofa stimulation pulse train, a polarity configuration of electrodes, a setof electrodes that is used, and a stimulation frequency.
 14. The methodof claim 1, wherein the first set of information comprises a voltagelevel of a stimulation pulse, a pulse width of the stimulation pulse,and a configuration of electrodes designating a set of electrodes, theset of electrodes comprising an electrode, the method furthercomprising: (f) determining a surface area of the electrode; (g)determining a charge density that is associated with the electrode; and(h) if the charge density is greater than a predetermined threshold,rejecting the first set of information in order that the first treatmenttherapy corresponding to the first set of information is not deliveredto the patient.
 15. The method of claim 14, wherein the charge densityis approximately equal to a current multiplied by the pulse width of thestimulation pulse divided by the surface area of the electrode.
 16. Themethod of claim 15, wherein the current is approximately equal to thevoltage level of the stimulation pulse divided by an impedance of theset of electrodes.
 17. The method of claim 1, further comprising: (f)transitioning operation to a run mode; (g) receiving a subsequent set ofinformation from the user, the subsequent set of information beingassociated with a subsequent treatment therapy configuration; and (h) ifthe first treatment therapy is not acceptable and if the subsequent setof information corresponds to a subsequent treatment therapy thatexceeds a corresponding level of tolerance associated with the firsttreatment therapy, rejecting the subsequent set of information.
 18. Themethod of claim 1, wherein the treatment utilizes drug infusion.
 19. Themethod of claim 18, wherein the first input value is selected from thegroup consisting of a drug type, a drug dosage, at least one infusionsite, an infusion rate, and a time of delivering the drug dosage. 20.The method of claim 1, wherein the nervous system disorder is selectedfrom the group consisting of a disorder of a central nervous system, adisorder of a peripheral nervous system, a mental health disorder, andpsychiatric disorder.
 21. The method of claim 20, wherein the nervoussystem disorder is selected from the group consisting of epilepsy,Parkinson's disease, essential tremor, dystonia, multiple sclerosis(MS), anxiety, a mood disorder, a sleep disorder, obesity, and anorexia.22. The method of claim 1, wherein the first treatment therapy isselected from the group consisting of electrical stimulation, magneticstimulation, drug infusion, and brain temperature control.
 23. Themethod of claim 1, wherein the first treatment therapy is provided to alocation of a body selected from the group consisting of a brain, avagal nerve, a spinal cord, and a peripheral nerve.
 24. The method ofclaim 1, wherein the medical device system is selected from the groupconsisting of an external system, an implanted system, and a hybridsystem.
 25. An apparatus for configuring and testing therapy parametersfor a treatment of a nervous system disorder with a medical devicesystem, the apparatus comprising in combination: a user interface; atreatment therapy module; a memory; and a processor that is connected tothe user interface in order to receive a command from a user and to senda response to the user and that instructs the treatment therapy module,the processor configured to perform: (a) receiving a first set ofinformation from the user through the user interface, the first set ofinformation being associated with a first treatment therapyconfiguration; (b) assessing whether the first set of information iswithin a range of safety; (c) applying a first treatment therapy to apatient through the treatment therapy module in accordance with thefirst set of information; (d) if the first treatment therapy is notsafe, executing a corrective action; and (e) if the first treatmenttherapy is safe, storing the first set of information in the memory,wherein the first set of information is accessible for a subsequenttreatment therapy.
 26. The apparatus of claim 25, wherein the processoris configured to perform: (f) receiving an indication from the userwhether the first treatment therapy is tolerable to the patient; and (g)if the first treatment therapy is not tolerable, executing acorresponding action.
 27. The apparatus of claim 25, wherein theprocessor is configured to perform: (f) associating a first label withthe first set of information.
 28. The apparatus of claim 27, wherein theprocessor is configured to perform: (g) receiving another set ofinformation from the user, the other set of information being associatedwith another treatment therapy configuration; (h) associating anotherlabel with the other set of information; and (i) comparing the first setof information with the other set of information.
 29. The apparatus ofclaim 28, wherein the processor is configured to perform: (j) if theother treatment therapy configuration is essentially unique, storing theother set of information and the other label.
 30. The apparatus of claim28, wherein the processor is configured to perform: (j) if the othertreatment therapy configuration is not essentially unique, outputting anotification to the user.
 31. The apparatus of claim 28, wherein theprocessor is configured to perform: (j) if the other treatment therapyconfiguration is not essentially unique, rejecting the second set ofinformation.
 32. The apparatus of claim 25, wherein the first set ofinformation comprises a voltage level of a stimulation pulse, a pulsewidth of the stimulation pulse, a frequency of stimulation pulses, aduration of a stimulation pulse train, and a configuration ofelectrodes, the configuration of electrodes corresponding to a set ofelectrodes, the set of electrodes comprising an electrode, and whereinthe processor is configured to performs: (f) determining a surface areaof the electrode; (g) determining a charge density that is associatedwith the electrode; and (h) if the charge density is greater than apredetermined threshold, rejecting the first set of information in orderthat the first treatment therapy corresponding to the first set ofinformation is not delivered to the patient.
 33. The apparatus of claim25, wherein the processor is configured to perform: (f) transitioningoperation to a run mode; (g) receiving a subsequent set of informationfrom the user through the user interface, the subsequent set ofinformation being associated with a subsequent treatment therapyconfiguration; and (h) if the first treatment therapy is not acceptableand if the subsequent set of information corresponds to a subsequenttreatment therapy that exceeds a corresponding level of toleranceassociated with the first treatment therapy, rejecting the subsequentset of information.
 34. A computer-readable medium havingcomputer-executable instructions for performing the method recited inclaim
 1. 35. The computer-readable medium having computer-executableinstructions for performing the method recited in claim
 4. 36. Thecomputer-readable medium having computer-executable instructions forperforming the method recited in claim
 5. 37. A computer-readable mediumhaving computer-executable instructions for performing the methodrecited in claim 8.